Clock and Dominating Set Construction in Ad Hoc Wireless Networks

DISSERTATION

Presented in Partial Fulfillment of the Requirements for the Degree Doctor of Philosophy in the

Graduate School of The Ohio State University

By

Dong Zhou, M.S.

*****

The Ohio State University

2005

Dissertation Committee: Approved by

Professor Ten-Hwang Lai, Adviser Professor Anish Arora Adviser Professor Dong Xuan Graduate Program in Computer Science and Engineering c Copyright by

Dong Zhou

2005 ABSTRACT

Ad Hoc wireless networks have been gaining importance in the communication world for the past decade. Wireless network extends the access to the network by removing the restriction of physical wires. Ad hoc network further improves the network coverage and availability to places without infrastructure support. synchronization and dominating set are two of the fundamental issues in the wireless ad hoc networks. They are important for the correctness and/or performance of many protocols and applications. We focus on IEEE 802.11 wireless ad hoc networks in this dissertation due to the wide deployments of 802.11 networks. The theories and practices are definitely extensible to other types of ad hoc networks.

IEEE 802.11 wireless network depends heavily on the distribution of timing in- formation to all the stations in the network. Clock synchronization is important for frequency hopping, power saving and wireless medium reservation. We review the

Timing Synchronization Function (TSF) of Ad Hoc mode defined in the 802.11 stan- dard. It is well-known that the 802.11 TSF is not scalable. We carefully analyze the root causes of the scalability problem and design new schemes to overcome the problem. Our new schemes show great improvement over the 802.11 TSF and other solutions in the fields. Our solutions have nice characteristics: scalable, accurate, bounded and adaptive to station mobility. We are able to control the maximum clock differences under 25 µs and 50 µs in single hop and multihop networks respectively.

ii The performance improvement is at least 200% or more compared with the current solutions.

Dominating set has been widely used in multihop ad hoc networks (MANET) by numerous routing, broadcast and collision avoidance protocols. The problem to construct a minimum sized dominating set is known to be NP-hard. We propose a protocol that is simple, distributed, inexpensive, and adaptive to station mobility.

We show that our protocol can construct dominating set using 35% to 60% less nodes than other distributed dominating set protocols.

We study and address two of the fundamental and difficult problems in ad hoc wireless networks. Our solutions show significant improvements over the current so- lutions. Our work provides solid foundations to other important problems: routing, power saving, frequency hopping, media access scheduling, and broadcast storm mit- igation.

iii To Xiang, Ellen and Austin

iv ACKNOWLEDGMENTS

I would like to thank my advisor, Professor Ten-Hwang Lai, for his dedication, commitment, insight and advices during my research. The conversation with Pro- fessor Lai is always interesting and stimulating. His research methodology and the way he approaches the problems teach me how to meet the challenges posed by the problems and how to push my own limitations in order to land on a higher ground.

These advices will follow me through my personal and professional life.

I would like to thank Professor Anish Arora for sharing information on his sensor network projects with me. These discussions expanded my scope and gave me insight into my own research. I am amazed by the elegant theories and ideas that Professor

Arora and his team show in these projects. It propels me to set a higher standard for my own research.

I would like to thank Dr. Dong Xuan. He spent many hours with me on research problems and research methodologies. He advises me on many aspects of my profes- sional life. He shares his academic experiences and suggests me how to pick the best career path. These are valuable lessons for my next career move.

I am deeply indebted to my wife, Xiang Shen. She encouraged me to come back to finish my degree and has been supporting me all these years. Her love surrounds me through the most difficult times. Her encouragement and patience makes this dissertation possible.

v I would like to thank my two lovely children: my daughter Ellen and son Austin.

They are my inspiration for my research. They always show their love when I come home even after I have spent many sleepless days away from them.

I would like to thank my parents who always encourage me not to give up. Their persistence makes my comeback possible. I like to thank my sister to take care my parent when I am away from home. I would also thank my in-laws. They shared their research experience and showed me how to deal with stress and difficult situation.

I would like to thank Dr. Min-Te Sun, we worked together on several research papers and I admire his dedications to his friends. We become personal friends through research collaboration.

Finally I want to thank Li-Fei Huang for many of the discussions on clock syn- chronization.

vi VITA

September 11, 1968 ...... Born - Zibo, Shandong, China

July, 1989 ...... B.S. Computer Science, Beijing Univer- sity, Beijing, China July, 1992 ...... M.S. Computer Science, Beijing Uni- versity, Beijing, China December, 1993 ...... M.S. Computer and Information Sci- ence, The Ohio State University, Columbus, Ohio, USA January 1996-July, 1999 ...... Technical Consultant, Lucent Tech- nologies, Columbus, Ohio, USA July 1999-July, 2000 ...... Technical Consultant, MCI/UUNET, Columbus, Ohio, USA July 2000-present ...... Member of Technical Staff, Lucent Technologies, Columbus, Ohio, USA.

PUBLICATIONS

Research Publications

D. Zhou, T. H. Lai, A Scalable and Adaptive Clock Synchronization Protocol in IEEE 802.11-Based Multihop Ad Hoc Networks, Proceedings of the second IEEE international conference on Mobile Ad-hoc and Sensor Systems, Nov. 2005.

B. Kim, J. Yang, D. Zhou, M. T. Sun, Energy-Aware Connected Dominating Set Construction in Mobile Ad Hoc Networks, Proceedings of 14th IEEE International Conference on Computer Communications and Networks, pages 229-234, Oct. 2005.

vii D. Zhou, T. H. Lai, A Compatible and Scalable Clock Synchronization Protocol in IEEE 802.11 Ad Hoc Networks, Proceedings of the 34th International Conference on Parallel Processing, pages 295-302, Jun. 2005.

D. Zhou, M. T. Sun, T.H. Lai, A Timer-based Protocol for Connected Dominating Set Construction in IEEE 802.11 Multihop Mobile Ad Hoc Networks, Proceedings of the 2005 IEEE International Symposium on Application and the Internet, pages 2-8, Jan. 2005.

D. Zhou, T. H. Lai, Analysis and Implementation of Scalable Clock Synchronization Protocols in IEEE 802.11 Ad Hoc Networks, Proceedings of the first IEEE interna- tional conference on Mobile Ad-hoc and Sensor Systems, pages 255-263, Oct. 2004.

T. H. Lai, D. Zhou, Efficient and scalable IEEE 802.11 ad-hoc-mode timing synchro- nization function, 17th International Conference on Advanced Information Network- ing and Applications, pages 318-323, Mar. 2003.

D. Zhou, T. H. Lai, Backup Group Multiplexing: An Integrated Restoration Strat- egy for IP over WDM Optical Networks, Proceedings of International Conference on Computer Network and Mobile Computing, pages 235-240, Oct. 2001.

D. Zhou, T. H. Lai, Efficient Resource Allocation in Self-Healing Mesh Multiprotocol Label Switching Networks, Proceedings of IEEE GlobeCom, pages 2671-2675, Nov. 2001.

viii FIELDS OF STUDY

Major Field: Computer Science and Engineering

Studies in: Networking Prof. Ten-Hwang Lai Software Systems Prof. Anish Arora Theory and Algorithms Prof. Rephael Wenger

ix TABLE OF CONTENTS

Page

Abstract ...... ii

Dedication ...... iv

Acknowledgments ...... v

Vita ...... vii

List of Tables ...... xiii

List of Figures ...... xiv

Chapters:

1. Introduction ...... 1

1.1 Introduction to Wireless Networks ...... 1 1.2 Overview of 802.11 standards ...... 3 1.3 Overview of other wireless technologies ...... 5 1.4 Motivation ...... 6 1.4.1 Clock Synchronization ...... 6 1.4.2 Dominating Set Construction ...... 7 1.5 Contributions ...... 8 1.6 Organization of this Dissertation ...... 11

2. Background ...... 14

2.1 History of clock synchronization ...... 14 2.1.1 Full Plesiochrony ...... 15 2.1.2 Hierarchical Master-Slave Synchronization ...... 16 2.1.3 Mutual Synchronization ...... 16

x 2.2 IEEE 802.11 TSF and Frame Format ...... 17 2.3 Mathematical Model for ...... 20 2.4 Clock Technologies and Clock Performance Hierarchy ...... 22

3. Issues and Challenges in Wireless Ad Hoc Networks ...... 24

3.1 The importance of Timing Synchronization in 802.11 Ad Hoc Networks 24 3.2 Issues in the Current 802.11 TSF ...... 26 3.3 Requirements of for Timing Synchronization in 802.11 Networks . . 27 3.4 Formal Definition of the Minimum Dominating Set Problem . . . . 29 3.5 The Significance of the Minimum Dominating Set Problem . . . . . 29 3.6 Challenges of Solving the Minimum Dominating Set Problem in Wireless Ad Hoc Networks ...... 31

4. Analysis on the Scalability of 802.11 TSF ...... 33

4.1 Analysis of Beacon Contention ...... 34 4.2 Metrics for asynchronism ...... 36 4.3 Root Causes of Asynchronism and Some Possible Remedies . . . . 38 4.4 Summary ...... 41

5. Timing Synchronization Protocols in a single-hop 802.11 IBSS ...... 43

5.1 Overview of Clock Synchronization Protocols ...... 43 5.2 ATSP: Adaptive Timing Synchronization Procedure ...... 47 5.3 ABTSF: Adaptive bi-directional TSF ...... 49 5.4 TATSF: Tiered Adaptive Timing Synchronization Function . . . . 52 5.4.1 Overview of TATSF ...... 52 5.4.2 Analysis of TATSF ...... 54 5.5 SATSF: Self Adjusting Timing Synchronization Function . . . . . 57 5.5.1 Overview of Protocol ...... 57 5.5.2 Detailed Description of Protocol ...... 60 5.5.3 Analysis of Protocol ...... 66 5.5.4 Comparison between ASP and SATSF ...... 71 5.6 Performance Studies ...... 73 5.6.1 Simulation results for 802.11 TSF/ Bi-directional TSF . . . 74 5.6.2 Simulation results for ATSP ...... 76 5.6.3 Simulation results for TATSF/ ABTSF ...... 78 5.6.4 Simulation results for ASP and SATSF ...... 80 5.7 Summary ...... 87

xi 6. Clock Synchronization in 802.11-based Multihop Ad Hoc Networks . . . 89

6.1 Overview of Current Clock Synchronization Protocols in 802.11- based Multhop Ad Hoc Networks ...... 89 6.2 MATSF ...... 90 6.2.1 Overview of our Protocol ...... 91 6.2.2 A Scalable Solution for Clock Synchronization: MATSF . . 98 6.2.3 Analysis of the protocol ...... 103 6.3 Performance studies ...... 110 6.4 Summary ...... 114

7. A Timer-based Protocol for Connected Dominating Set Construction in IEEE 802.11 Multihop Mobile Ad Hoc Networks ...... 115

7.1 Current CDS solutions ...... 115 7.2 Requirements for Connected Dominating Set in MANETS . . . . . 117 7.3 MAC-layer Timer-based Connected Dominating Set Construction Protocol ...... 118 7.3.1 Notation Definitions ...... 118 7.3.2 The MTCDS Protocol ...... 119 7.3.3 Beacon Frame Extension ...... 123 7.3.4 Correctness of the MTCDS Protocol ...... 123 7.3.5 Station Mobility Handling ...... 126 7.4 Implementation Considerations ...... 128 7.5 Performance Studies ...... 130 7.6 Framework Extension ...... 132 7.7 Summary ...... 134

8. Contributions and Future Work ...... 136

8.1 Research Contributions ...... 136 8.2 Future Work ...... 138

Appendices:

A. ABBREVIATIONS ...... 141

Bibliography ...... 145

xii LIST OF TABLES

Table Page

2.1 Beacon generation window and slot time ...... 18

5.1 Token bits explanation ...... 51

5.2 Maximum clock offset of bi-directional TSF for n = 200 ...... 74

5.3 Maximum clock offset of TATSF and ABTSF ...... 80

5.4 Maximum clock offsets of SATSF and ASP ...... 84

5.5 Average maximum clock offset of SATSF and ASP in mixed mode . . 85

6.1 Maximum clock offset of MATSF, ASP and 802.11 TSF ...... 113

6.2 Average maximum clock offset of MATSF, ASP and 802.11 TSF . . . 114

xiii LIST OF FIGURES

Figure Page

1.1 The IEEE 802 family and relationship to OSI model ...... 4

2.1 Full plesiochrony (Anarchy) ...... 15

2.2 Hierarchical Master-Slave Synchronization ...... 16

2.3 Mutual Synchronization ...... 17

2.4 Beacon generation window ...... 20

4.1 p(n, w)...... 35

4.2 p0(n, w) ...... 36

4.3 H0 and L0 ...... 38

5.1 ATSP: Adaptive Timing Synchronization Procedure ...... 48

5.2 Beacon Frame Format for ABTSF ...... 50

5.3 TATSF: Tiered Adaptive Timing Synchronization Procedure . . . . . 53

5.4 Maximum clock offset for 802.11 TSP ...... 75

5.5 Maximum clock offset for 802.11 TSP ...... 75

5.6 Maximum clock offset for ATSP ...... 77

5.7 Maximum clock offset for ATSP ...... 77

xiv 5.8 Maximum clock offset for TATSF ...... 78

5.9 Maximum clock offset for TATSF ...... 79

5.10 Maximum clock offset for ASP ...... 81

5.11 Maximum clock offset for ASP with one non-compliance station . . . 82

5.12 Maximum clock offset for SATSF ...... 83

5.13 Maximum clock offset for SATSF with one non-compliance station . . 83

5.14 Maximum clock offset for SATSF ...... 84

6.1 Covered, bridge and uncovered nodes ...... 95

6.2 One bridge is enough to enter DS ...... 97

6.3 It is difficult to recognize gateways...... 97

6.4 Probability that success black beacons ≥ 1 ...... 108

6.5 Maximum clock offset for 802.11 TSF ...... 110

6.6 Maximum clock offset for ASP ...... 111

6.7 Maximum clock offset for MATSF ...... 112

7.1 Initiator Election Protocol ...... 120

7.2 Timer-based Connected Dominating Set Construction Protocol . . . . 122

7.3 Beacon Frame Format ...... 124

7.4 initMax for m × m grid under various beacon success rate ...... 129

7.5 DS size in 4 x 4 grid ...... 131

7.6 DS size in 8 x 8 grid ...... 132

xv CHAPTER 1

INTRODUCTION

In this chapter, we will overview the current development in wireless networks and present the motivations of our research works and highlight the contributions we have made through our research efforts.

1.1 Introduction to Wireless Networks

Wireless networks have experienced explosive growth during the last decade. The revenues from wireless networks are exceeding that of wired networks. This phe- nomenon is due to the advantages offered by wireless networks. People move, but the data is typically stored centrally. The capability to access data on the move leads to large productivity gains [16]. First generation wireless networks are analog phone networks such as AMPS (Advance Mobile Phone Services) developed by Bell Lab- oratories. Frequency division multiple access (FDMA) technology is used for radio communications. These networks supplement the wired PSTN (Public Services Tele- phone Networks). Analog wireless systems allow people to make phone calls where the

PSTN services are not available. Second generation digital networks are developed to cope with the higher user densities. GSM (Global System for Mobile Communi- cations), North American TDMA (Time division multiple access) IS-136 and CDMA

1 (Code Division Multiple Access) IS-95 are among the popular second-generation sys- tems. To meet the demand of wireless data services such as SMS (Short Messaging

Service), GPRS (General Packet Radio Service) and EDGE (Enhanced Data-rate for

GSM Evolution) are developed for TDMA/GSM systems and CDMA2000-1X system is developed for CDMA systems. To support wireless Internet access and wireless multimedia services (including audio, video, and images), third generation (3G) sys- tems are developed. Wideband CDMA (W-CDMA), cdma2000 (including EVDO and

EVDV), TD-SCDMA (Time Division Synchronous Code Division Multiple Access) are among the approved 3G standards. 3G technologies support 144 Kbps bandwidth with high-speed movement (e.g., in vehicles), 384 Kbps with pedestrian, and 2 Mbps for stationary users [26].

In this dissertation, we focus on the wireless local area networks (LAN), in par- ticular IEEE 802.11 wireless LANs. Since there is no need to install cables, wireless

LANs are extremely popular in old office buildings, historic sites and homes. Even for modem facilities, wiring the build is still expensive and time-consuming. With- out the restrictions of physical cables, mobile users can form a network without any infrastructure support. This flexibility is important for military networks and group gatherings where people are from many different organizations. This is the ad hoc mode of operation. An ad hoc wireless network is a LAN that the network devices are part of the network only for the duration of a communication session and the network is formed when these devices are in some close proximity to the rest of the network. In Latin, ad hoc literally means “for this,” further meaning “for this purpose only,” and thus usually temporary. The 802.11 networks are heavily prompted by the

Wi-Fi (Wireless Fidelity) Alliance[36]. It oversees the certification tests for product

2 interoperability. The Wi-Fi marketing effort is widely successful. Many airports, hotels, fast-food facilities, agencies, schools, homes and various other businesses have adopted 802.11 wireless LANs as alternatives to wired LANs.

1.2 Overview of 802.11 standards

IEEE 802.11 is a member of the IEEE 802 family, which is a set of specifications for

LAN technologies. The 802 standards define the physical and data link layer protocols in the OSI model. The data link layer is further divided into two sublayers: Logical link control (LLC) sublayer and media access control (MAC) sublayer. Fig. 1.1 shows the IEEE 802 family protocol stack and its relation to the OSI model[16].

The base 802.11 specification[1] supports two physical layers: FHSS and DSSS in the 2.4 GHz frequency band. The data rate is 1 Mbps or 2 Mbps. The 802.11b specification[3] adopts a high-rate DSSS physical layer in the 2.4 GHz frequency band. The data rate can be 5.5 Mbps or 11 Mbps. The 802.11a standard[2] specifies an orthogonal frequency division multiplexing (OFDM) physical layer in the 5 GHz frequency band. The data rate is up to 54 Mbps. The 802.11g specification[4] can support data rate up to 54 Mbps and operate in the 2.4 GHz frequency band. It can use FHSS, DSSS or OFDM. It is compatible with 802.11b. An upcoming protocol in the 802.11 protocol family is called 802.11n. It is not yet standardized. It will use multiple-input, multiple-output (MIMO) antenna technology. The data rate can be over 100 Mbps. The radio range of 802.11 devices is in the order of 100 meters.

In 802.11 networks, a group of stations within the communication range of each other can form a basic service set (BSS). There are two types of BSS: infrastructure

3 Data link 802 802.1 layer Overview Management 802.2 Logical link control (LLC) and LLC Architecture sublayer

MAC 802.11 MAC 802.3 802.5 sublayer MAC MAC

802.11b Physical 802.11 802.11 802.11a HR/ layer 802.3 802.5 FHSS DSSS OFDM DSSS PHY PHY PHY PHY PHY PHY

Figure 1.1: The IEEE 802 family and relationship to OSI model

BSS and independent BSS (IBSS). For infrastructure BSS, an access point is the cen- tral point of the BSS. All communications including communications between stations within the BSS is through the access point. For IBSS, the stations can communicate directly with each other and all the stations are within the direct communication range. An IBSS is an ad hoc network. In this dissertation, we will mainly study the issues in ad hoc networks.

Compared with the cellular wireless networks, 802.11 wireless LANs have higher bandwidth, lower cost but limited coverage. Cellular networks enjoy large coverage area but lower data rate. These two types of networks complement each other. The integration of these networks is one of the future research directions.

4 1.3 Overview of other wireless technologies

Bluetooth is a WLAN standard for radio devices within the range of 10 meters[42].

Bluetooth can support up to 7 devices per piconet. Frequency hopping and TDD

(Time Division Duplex) are used for point-to-point communications. The data rate is around 1 Mbps. Blue tooth device is very cheap ($5 or less). The intent is to connect devices with a nominal range of about one to three meters. It can be used to connect laptop, PDA, cellular phone, keyboard, mouse, printer and other devices[32].

IEEE 802.16 (Wi-Max) technology utilizes microwave for high-speed wireless data transfer. The term Wi-Max comes from Wireless (Wi) Microwave Access (MA). Like

802.11a, it uses the OFDM to achieve high data rate. It supports data rate up to

70 Mbps and distance up to 30 miles. 802.16 standard is for stationary user only, the mobility support will be added through 802.16e. These standards are still in development.

IEEE 802.20, also known as Mobile-Fi, is a standard designed from the ground up as a mobile system. It supports data rate up to 1.5 Mbps at high speed of 75 mph.

Sensor networks are special kinds of ad hoc networks. The sensor devices are low power, low cost. They are deployed in large quantities in areas that may not be easily accessible. Power saving, network scalability and self-healing of networks are some of the important topics in sensor networks.

Wireless LAN switches and routers are developed to connect the wireless net- works to the wireline backbone. Software-defined radio can be deployed to let the mobile station work with various types of wireless network. IP multimedia subsys- tem (IMS) allows the integration and roaming between wireline, 2G/3G/4G cellular,

VOIP, 802.11 and other network systems.

5 Combining all these technologies combined, the future generation of networks will be IP-centric converged networks. The services offered and applications provided on these networks could greatly change the way people communicate and collaborate with each other. The life style of each of us may be changed greatly by these networks.

Our research is part of effort to make that vision possible.

1.4 Motivation

802.11 ad hoc networks have many advantages over networks in infrastructure mode. Each station in an IBSS is a peer to each other. There is no central point of failure. The IBSS is set up automatically when the stations enter into their trans- mission ranges. There is no configuration and administration cost. In the battlefield scenario, ad hoc networks are the only feasible solutions. Infrastructure is hard to obtain and it takes time and resources to protect these network infrastructures. Ad hoc networks are more robust. An IBSS is still functioning even if a large number of stations are destroyed. For infrastructure BSS, the network is dead if the access point is damaged.

However, most of the deployments of 802.11 networks are still infrastructure BSSs.

The reason is that there are still a lot challenging issues in 802.11-based ad hoc networks. In this dissertation, we will study two of the fundamental issues. The first one is clock synchronization and the second is the construction of dominating set.

1.4.1 Clock Synchronization

Timing synchronization is always critical in network systems. Network synchro- nization has been gaining importance in the last 30 years when the transmission and switching of telecommunication systems turned digital. Network systems like

6 SDH (Synchronous Digital Hierachy)/SONET (Synchronous Optical Network) re- quire strict clock synchronization. Cellular mobile phone systems like GSM, North

American TDMA, CDMA and UMTS (Universal Mobile Telecommunications Sys- tem) all demand accurate time synchronization. Time synchronization has been proven to affect the quality of service for these systems[7].

In cellular phone networks, Global Positioning System (GPS) is utilized to syn- chronize base station’s clock. It is widely used in CDMA-based systems. Since major

3G standards like CDMA2000 and UMTS are all CDMA-based, GPS receivers are widely deployed in these systems. In addition to the GPS receiver, base station normally has one or two additional clock reference sources in case the GPS receiver fails to receive timing information from the satellite systems. It may have one clock source based on atomic frequency standards such as Rubidium standard, Caesium- beam standard and Hydrogen MASTER standard. It may also have an additional backup clock source based on quartz oscillator.

In 802.11 systems, we do not have a lot of options for clock synchronization. Due to the mass-market nature of the networks, only low cost hardware can be selected. In most of the 802.11 networks, crystal oscillators are deployed. They are much cheaper than the GPS systems and the atomic clocks, but the accuracy of the clock is much worse. This makes the clock synchronization problem more challenging.

1.4.2 Dominating Set Construction

A dominating set is a subset of vertices in which each vertex is either in the dominating set or adjacent to some vertex in the dominating set. If vertices in the dominating set form a connected graph, then the dominating set is called connected

7 dominating set. A dominating set with minimum size has many applications in wire- less ad hoc networks. A (connected) minimum dominating set is commonly used as the virtual backbone of the network [9]. It has been found extremely useful in routing

[13] [47] [48] [46], broadcast [11] [41] [10], and collision avoidance [45]. It is one of the fundamental issues in wireless ad hoc networks. However the problem is very hard to solve, minimum dominating set is shown to be NP-hard. In this dissertation, we will work on some efficient algorithms to find near optimal dominating set in wireless ad hoc networks.

1.5 Contributions

The scalability problem of the 802.11 timing synchronization function was first discovered in[19]. Unless the number of stations in an IBSS is very small, there is a non-negligible probability that stations may get out of synchronization. The more stations, the higher probability of asynchronism. In this sense, the current IEEE

802.11’s synchronization mechanism does not scale well; it cannot support a large- scale ad hoc network, say, from 150 to 200 stations.

We first study the ATSP protocol proposed in [19] to address the scalability prob- lem. ATSP works much better for large ad hoc networks than the IEEE 802.11 TSF standard. But it suffers two problems: the maximum clock difference between the fastest station and the slowest station may shoot up to over 500 µs for some occasions even when the hosts are stationary, the clock may be out of synchronization when the fastest station leaves the IBSS[23]. We analyze why ATSP suffer from these problems and then propose new remedies to improve the performance. We then proposed two

8 protocols: TATSF and ABTSF. TATSF stands for tiered adaptive timing synchro- nization function. TATSF is compatible with the 802.11 TSF and can control the maximum clock difference under 125µs. ABSTF stands for adaptive bidirectional timing synchronization function. ABTSF is deigned from scratch and it can achieve even better synchronization. The maximum clock difference is under 50µs[51].

By careful examination of the clock models and reasons for clock adjustment errors, we are able to design a compatible protocol called SATSF[52]. SATSF stands for self-adjusting timing synchronization function. SATSF meets all the desirable requirements: simple, scalable, accurate, compatible, bounded and adaptive to station mobility. For SATSF, the maximum clock offset can be controlled within 20 µs with the worst clocks allowed by the standard. In particular, we want to point out that

SATSF is completely compatible with the current 802.11 TSF protocol by keeping the beacon frame format intact. Since beacon frame is one of the most important control frames in 802.11 protocols, a received beacon is validated by the current protocols.

A format change may fail these validations and make the TSF protocol fail in a mixed-mode IBSS.

The challenge of our work is to meet the industry expectation of time accuracy

(maximum clock offset under 25µs) with a compatible, scalable, mobility-friendly and cheap solution. It is not difficult to satisfy some of the requirements. But it is quite an effort to hit all the targets. SATSF can meet all these challenges.

After getting satisfying synchronization accuracy in a single-hop IBSS, we expand our work to address the scalability problem in an 802.11-based multihop mobile ad hoc network (MANET). The single-hop solutions cannot be adopted directly into the MANET. Simply giving priority to the fastest station(s) will not be enough. It

9 may take very long time for the timing information of the fastest station to reach the stations many hops away. The accuracy of these types of TSFs will suffer in multihop networks. We propose a new protocol called multihop adaptive timing synchronization function (MATSF). For MATSF, the maximum clock difference can be controlled within 50 µs with the worst clocks allowed by the standard[53]. The improvement is more than 400% over the current solutions of similar complexity.

The protocol converges in less than 10 seconds. It converges several times faster than current solutions.

We study the problem of connected dominating set construction. We present a

MAC-Layer Timer-based Connected Dominating Set Construction Protocol (MTCDS).

There are many advantages by constructing dominating set in the MAC layer. It can detect topology changes quickly; the resulting dominating set can be utilized by up- per layer protocols such as routing protocols. Most of the information needed by the protocol is already available in the underline time synchronization protocol. There is little or no overhead by piggybacking on the existing TSF.

MTCDS is simple, distributed, inexpensive, and adaptive to station mobility.

Only one hop neighbor information is needed. The simulation results show that our protocol can construct connected dominating set using 35% to 60% less nodes than other distributed connected dominating set protocols.

MTCDS can be easily extended to execute greedy algorithms in ad hoc networks.

We are able to achieve very good results by extending the framework to the construc- tion of power aware CDS and efficient broadcasting schemes.

10 1.6 Organization of this Dissertation

The rest of this Dissertation is organized as follows.

Chapter 2 gives a brief overview of clock synchronization history. In particular, we introduce the clock synchronization protocol and the beacon frame format defined by the IEEE 802.11 TSF. A mathematical model for clocks used by the common network systems is presented. We also examine various clock technologies and their performance characteristics.

Chapter 3 introduces the issues and the challenges for the two fundamental prob- lems we will study in this dissertation. We first show the importance of clock syn- chronization in wireless ad hoc networks and then list the problems of the current

802.11 TSF. The most important issue is the scalability issue. We follow up with the requirements for ideal clock synchronization protocols in 802.11 networks. We give the formal definition of the minimum dominating set (MDS) problem including the connected dominating set problem. The significance of the minimum dominating set and the applications of the MDS protocols are outlined. We conclude the chapter with the investigation of the challenges of minimum dominating set construction in wireless ad hoc networks.

Chapter 4 reviews the analytical results of the scalability issue of 802.11 Timing

Synchronization Function. The probability of at least one successful beacon trans- mission during the beacon window and the probability of one particular station’s successful beacon transmission are presented. We then define the metrics for the asynchronisim. We further analyze the root causes of the asynchronism to set up the foundations of our proposed new solutions in later chapters.

11 In chapter 5, we first overview the related clock synchronization protocols includ- ing logical clock synchronization, network time synchronization used for the Internet and various clock synchronization protocols applied in sensor networks. These proto- cols cannot be adapted easily into the 802.11 TSF frameworks. We then investigate the TSF protocols designed for single-hop 802.11 IBSSs. We can see ATSP effectively solves the scalability problem, but cannot handle mobility very well. ABTSF and

TATSF can handle both scalability and mobility very well. However the maximum clock offset is still above the industry expectation of 25µs. Finally we introduce

SATSF, which is a self adjustment protocol with bounded frequency adjustment.

The performance of SATSF is very well and exceeds the industry requirements. More important, the protocol is completely compatible with the current 802.11 TSF. It is ready to be deployed in a stand alone or mixed environment. Extensive simula- tion works are done to present the maximum and average clock offsets under various conditions.

In chapter 6, we study the clock synchronization problem in 802.11-based multihop ad hoc networks. First we overview the current solutions in the field, then we propose a new protocol called MATSF. MATSF can achieve very good clock synchronization accuracy through beacon transmission prioritization, bounded frequency adjustment and construction of dominating set. Simulation shows that MATSF can improve the maximum clock offset by at least 400%.

Chapter 7 studies the construction of dominating sets in 802.11-based multihop mobile ad hoc networks. We first examine the importance and the applications of the dominating set problem in wireless ad hoc networks. We then proceed to review the current solutions for connected dominating set construction in wireless ad hoc

12 networks. The current solutions suffer from one or more problems: the resulting

CDS (Connected Dominating Set) is not very small; the protocols may not adapt to topology changes; the protocol introduces extensive overheads. All these issues are undesirable for the construction of dominating set in mobile ad hoc networks; there is a need to find a better solution. We are able to find such a solution to resolve all these problems. The protocol is called MTCDS. We prove that structure we build is a dominating set and it is connected. We analyze the handling of station mobility by MTCDS. The design and implementation issues are studied. We compare the performance of MTCDS with the current solutions. MTCDS constantly out-performs the current solutions in term of the size of dominating set. MTCDS can be extended to be a framework for the implementation of greedy algorithm in mobile ad hoc networks. We are able to construct an energy-aware connected dominating set with small size and the resulting network has a longer life span than the current solutions.

The framework can be applied to optimize other facts of mobile ad hoc networks in a simple and efficient way.

Chapter 8 summarizes the contributions of the dissertation, and gives pointers to future researchs that can be built up on top of the current research achievements.

Appendix A compiles a list of abbreviations used in the dissertation.

13 CHAPTER 2

BACKGROUND

2.1 History of clock synchronization

Clock synchronization is a classic issue in telecommunication networks for the past

30 years. Digital switching equipments (e.g. 5ESS or DMS) require synchronization to avoid slips at the input elastic stores. Voice traffics are not affected much by the synchronization slips. However, the slips have significant impact on circuit switched data services. Synchronization became to gain importance with the introduction of ISDN (Integrated Service Digital Network). The needs to get accurate reference clock have grown with the wide deployment of SDH and SONET. Currently most of the communication systems like ATM, GSM, CDMA and UMTS require access to common timing references.

Clock synchronization is not only needed in telecommunication networks; synchro- nization of large number of oscillators can be found in nature. Some types of fireflies

flash their light organs at regular but independent intervals if they are far away.

When they gather in a close proximity, they start to synchronize their light organs until they flash in unison[27]. Another example is the synchronization of individual

fibers in heart muscles to produce a regular heartbeat.

14

Figure 2.1: Full plesiochrony (Anarchy)

Many clock synchronization strategies have been proposed throughout the last three decades. Among them, there are three strategies that are widely deployed: full plesiochrony, hierarchical master-slave (HMS) synchronization, and mutual synchronization[6].

2.1.1 Full Plesiochrony

This strategy is a no-synchronization strategy. Each network element has an independent clock; there is no timing distribution between clocks as shown in Fig. 2.1.

Therefore it is called anarchy. Anarchy is the easy way of government, but the success of an anarchy society depends on the good behavior of each member. In this type of synchronization, the accuracy of each clock must be excellent. It has been widely utilized in FDM and PDH networks. These systems typically use atomic oscillators.

This strategy only works for system with limited synchronization requirement. It is eventually abandoned due to the more demanding requirements by communication systems.

15

Figure 2.2: Hierarchical Master-Slave Synchronization

2.1.2 Hierarchical Master-Slave Synchronization

The basic strategy for master-slave synchronization is to distribute the time of a master clock to all the other clocks of the network directly or indirectly (through other slaves) as shown in Fig. 2.2. Despotism is the socio-political analogy. Even though is not unethical, but it is highly effective for tight control over slaves. All the stations are synchronized by the master clock and the network is stable. The issue is what will happen if the master clock fails. To order to avoid the single point of failure, master-slave synchronization system is organized in two or more hierarchical layers. Therefore it is called hierarchical master-slave synchronization (HMS). HMS is widely deployed in modern digital telecommunication networks due to the excellent timing performance and reliability that can be achieved at limited cost.

2.1.3 Mutual Synchronization

Mutual synchronization applies the mutual control concept among the clocks.

The output frequency of each clock is the collected suggestions of other clocks. The

16

Figure 2.3: Mutual Synchronization

mutual synchronization operates like a pure democracy as shown in Fig. 2.3. There are no masters and no slaves. It is a peer-to-peer network. However the behavior of each element is hard to control[27, 28]. “Modeling the behavior of such networks or even ensuring the stability of the control algorithms, can be a very complex task.

Networks so designed thus tend to be quite expensive, but extremely reliable.” [7]

The applications of mutual synchronization are limited to special cases (e.g. military networks).

2.2 IEEE 802.11 TSF and Frame Format

IEEE 802.11 standards [1, 2, 3, 4] specify a Timing Synchronization Function

(TSF) for both the infrastructure mode and the ad hoc mode in the MAC layer.

Each station maintains a TSF timer. It is a 64-bit counter driven by a 1-MHZ oscillator. It ticks in microseconds. The accuracy of the TSF timer shall be within

±0.01% according to [1].

17 FHSS DSSS OFDM aCWmin 15 31 15 aSlotTime (µs) 50 20 9 Speed (Mbps) 1 2 1 2 5.5 11 6 12 24 54 beacon length 13 8 34 22 14 12 12 8 5 4

Table 2.1: Beacon generation window and slot time

In infrastructure mode, the access point coordinates the timing synchronization, it sends out a beacon with a timestamp in it periodically. All the stations in the infrastructure BSS will update their TSF timers to match the timer of the access point. The TSF is simple and straightforward.

In ad hoc mode, according to the IEEE 802.11 specifications [1], each station maintains a TSF timer with modulus 264 counting in increments of microseconds

(µs). Since it takes more than 500 thousand years for the counter to wrap around, there is no need to worry about the wrapping around issue of the TSF timer. Timing synchronization is achieved by stations of the IBSS periodically exchanging timing information through beacon frames. The beacon frame contains a timestamp of the sending station. Each station in an IBSS shall adopt a received timing if it is later than the station’s own TSF timer. The beacon will be ignored if the beacon is corrupted due to collision or transmission error. We assume all the transmission errors can be detected through CRC. If we receive a beacon frame that passes CRC check, we will consider all the fields in the beacon frame are correct. All stations in the IBSS adopt a common value, aBeaconPeriod, that defines the length of beacon intervals or periods.

This value, established by the station that initiates the IBSS, defines a series of Target

Beacon Transmission Times (TBTTs) exactly aBeaconPeriod time units apart. Time

18 zero is defined to be a TBTT. This interval is called a beacon interval or beacon period

(BP). These two terms are used interchangeably throughout the dissertation. Beacon generation in an IBSS is distributed; all stations in the IBSS participate in the process as follows.

Beacon Generation and Clock Synchronization:

1. At each TBTT each station calculates a random delay uniformly distributed in

the range [0, w], where w = 2·aCWmin·aSlotTime. (The aCWmin and aSlot-

Time parameters are specified in Table 2.1.)

2. The station waits for the period of the random delay.

3. If a beacon arrives before the random delay timer has expired, the station

cancels the pending beacon transmission and the remaining random delay.

4. When the random delay timer expires, the station transmits a beacon with a

timestamp equal to the value of the station’s TSF timer1.

5. Upon receiving a beacon, a station sets its TSF timer to the timestamp of the

beacon if the value of the timestamp is later than the station’s TSF timer2. (It

is important to note that clocks only move forward and never backward.)

Thus, as illustrated in Fig 2.4, at the beginning of each beacon interval, there is a beacon generation window consisting of W + 1 slots. Each station is scheduled to

1More precisely, the timestamp is equal to the value of the TSF timer at the time the first bit of the timestamp is transmitted to the physical layer plus the transmitting station’s delay through its physical layer from the MAC-PHY interface to its interface with the wireless medium. This detail is not important for our analysis. 2Actually, the receiving station will adjust the timestamp by adding an amount equal to the delay through the physical layer, and the adjusted value of the timestamp is used for synchronization. This detail is not important for our analysis.

19 Beacon Interval

Beacon Generation Window (W+1 slots)

Figure 2.4: Beacon generation window

transmit a beacon at the beginning of one of the slots. The goal of the TSF is to synchronize all timers to the timer of the fastest station in the IBSS. Each station will stop contention for beacon transmission after the beacon generation window passes.

It will try to compete again at the start of the next TBTT.

For FHSS, the beacon size is at least 504 bits in the MAC layer, and the physical layer PLCP length is 128 bits. For DSSS/OFDM, the beacon size is at least 472 bits in the MAC layer and 192 bits for PLCP. The PLCP must be transmitted using

1Mbps, the rest of the beacon is transmitted using the agreed rate, the beacon length varies for different transmission speeds. The beacon lengths are shown on Table 2.1.

2.3 Mathematical Model for Clocks

Before we begin to study the clock synchronization problem, we need to under- stand the characteristics of clocks used in the 802.11 networks. We now introduce a common clock model widely used by the oscillator specialists and telecommunication engineers[7].

20 A clock is a device that employs a certain oscillator to generates a pseudo-periodic

(ideally periodical) signal, often modeled as a sine wave s(t),

s(t) = A(t) sin Φ(t) where A(t) is the instantaneous amplitude and Φ(t) the total phase. (The instanta- neous amplitude can be considered constant in most applications.) The clock ticks whenever the total phase increases by 2π (e.g., whenever Φ(t) = 2nπ, n = 0, 1, 2,...).

The timing information of s(t) is determined by its total phase Φ(t), which in turn is determined by the clock’s instantaneous frequency v(t):

1 dΦ(t) v(t) = (2.1) 2π dt

The instantaneous frequency v(t) is commonly modeled as:

v(t) = v0 + vd(t) + va(t)

where v0 models the oscillator’s starting frequency, vd(t) the oscillator’s frequency drift

(mainly due to aging), and va(t) the oscillator’s phase noise sources. The starting frequency, v0, is the sum of a nominal frequency vn (which is the same to all clocks of the same type/model) and and a starting frequency offset ∆v (which is specific to each individual clock):

v0 = vn + ∆v. (2.2)

The frequency drift, vd(t), for practical purpose, can be approximated as

vd(t) ≈ Dvnt (2.3) for some linear fractional frequency drift rate D.

21 The phase noise sources va(t) can be written as

1 dϕ(t) v (t) = (2.4) a 2π dt where ϕ(t) is a random process that models the short-term random phase deviation.

For our purpose, the phase noise factor is dominated by frequency offset (∆v) and frequency drift (Dvn), and, therefore, can be ignored.

The instantaneous frequency, v(t), thus can be modeled as

v(t) = vn + ∆v + Dvnt (2.5)

where vn, ∆v and Dvnt, are respectively the oscillator’s nominal frequency, frequency offset, and frequency drift.

2.4 Clock Technologies and Clock Performance Hierarchy

HMS is the most adopted synchronization strategy for modern telecommunication networks. ITU-T, ANSI and ETSI have defined standard architectures for hierarchical synchronization. The clocks are organized in levels:

• level 0: one or more master clocks generate network reference signal by running

in autonomous mode

• at lower level 1, 2, etc., slaves clocks are synchronized by signal coming from

the upper level and synchronize clocks at the lower levels

The ANSI standard place clocks into a hierarchy based on performance levels

(stratum level)[7]. A Primary Reference Source (PRS) is a master clock with a fre- quency accuracy of better than 10−11 with verification to the UTC (Coordinated

22 Universal Time). One class of PRS is a stratum-1 clock. A stratum-1 clock is a com-

pletely autonomous clock without any external steering reference. It usually consists

of an ensemble of caesium atomic frequency standards. LORAN-C and GPS clocks

are two PRSs that are not autonomous. These clock systems get reference signal

through LORAN-C or GPS navigational receivers. They also are equipped with local

clocks using either rubidium or quartz oscillators. LORAN-C is a land-based sys-

tem that was developed for maritime navigation and is operated by the US Coast

Guard. NAVSTAR (Navigation Satellite Tracking and Ranging) GPS is a satellite-

based system developed by US Department of Defense for its navigational needs and

is operated by US Air Force. A GPS clock can maintain a frequency accuracy of

10−13 with verification to the UTC.

Stratum-2 clocks are typically found in toll switching exchanges and some digital

cross-connect equipments. The long term free-run frequency accuracy is better than

1.6 × 10−8. They are mostly based on oven quartz or rubidium atomic oscillators.

Stratum-2 clocks have external reference inputs from stratum-1 clocks.

Stratum-3 clocks are intended for local digital switch and most digital cross- connect systems. The long term free-run frequency accuracy should be better than

4.6 × 10−6. They are typically based on temperature compensated quartz oscilla-

tors. Stratum-3E clocks are used in timing signal generation for SONET gears with

improved short-term stability.

Stratum-4 and Stratum-4E (specific for customer-premises equipment) slave clocks

are used in distribution networks and T1s, PBXs (Private Branch Exchange). The

long term free-run frequency accuracy should be better than 3.2 × 10−5.

23 CHAPTER 3

ISSUES AND CHALLENGES IN WIRELESS AD HOC NETWORKS

In the previous two chapters, we review the wireless network technologies and present the motivations for solving two of the fundamental problems in ad hoc net- works: clock synchronization and construction of dominating set. Now we are ready to analyze these two problems in detail and point out the issues and challenges posed by these two problems. This will layer a good foundation for the solutions of the problems.

3.1 The importance of Timing Synchronization in 802.11 Ad Hoc Networks

Like other communication systems, clock synchronization is critical for the op- eration and efficiency of 802.11 networks. Clock synchronization is needed for both infrastructure networks and ad hoc networks. Since TSF in infrastructure mode is simple and scalable, we will focus on TSF in ad hoc mode.

As specified in the 802.11 standard[1], the 802.11 TSF provides a mechanism for stations in a frequency-hopping system to synchronize transition from one channel to another. Every station maintains a table of all of the hopping sequences that are used in the system. All of the stations in a BSS use the same hopping sequence.

24 Each beacon frame and probe response frame include the channel synchronization information necessary to determine the hop pattern and timing for the BSS. Stations use their TSF timer to time the aCurrentDwellTime. The aCurrentDwellTime is the length of time that each station stays on each frequency in its hopping sequence. A station in the BSS will issue an appropriate service primitive for the current physical layer to tune to the next frequency in the hopping sequence whenever TSF timer

MOD aCurrentDwellTime = 0.

Power management is another area where timing synchronization plays an im- portant role. The basic approach is that before transmitting MSDUs (MAC Service

Data Unit) to a power-conserving station, the stations first announce when to send the MSDUs during a period when all stations are awake. The announcement is done via an ad hoc traffic indication message (ATIM). A station in the PS (power saving) mode shall listen for these announcements to determine if it needs to remain in the awake state. When an MSDU is to be transmitted to a destination station that is in a PS mode, the transmitting station first transmits an ATIM frame during the ATIM

Window, in which all the stations including those operating in a PS mode are awake.

The ATIM Window is defined as a specific period of time, defined by aATIMWindow, following a TBTT, during which only Beacon or ATIM frames shall be transmitted.

ATIM transmission times are randomized, after a Beacon frame is either transmitted or received by the station, using the backoff procedure with the contention window equal to aCWmin. Directed ATIMs shall be acknowledged. If a station transmitting a directed ATIM does not receive an acknowledgment, the station shall execute the backoff procedure for retransmission of the ATIM. Multicast ATIMs shall not be ac- knowledged. If a station receives a directed ATIM frame during the ATIM Window,

25 it shall acknowledge the directed ATIM and stay awake for the entire beacon interval waiting for the announced MSDU(s) to be received. If a station does not receive an

ATIM, it may enter the Doze state at the end of the ATIM Window. Transmissions of MSDUs announced by ATIMs are randomized after the ATIM Window, using the binary backoff procedure. An accurate time synchronization protocol will reduce the length of the period when all the stations must be awake to listen for ATIM frames and therefore save power consumption for stations in the IBSS.

Clock synchronization is also important for scheduling and medium reservation protocols. In order to improve the network throughput and quality of services of

802.11 networks, various scheduling and reservation schemes are proposed. Time synchronization is assumed in these schemes. Without time synchronization, the per- formance improvements and QOS guarantee of these schemes will suffer significantly.

Therefore, it is safe to say that clock synchronization is one of the cornerstones for the performance and efficiency of 802.11 networks.

3.2 Issues in the Current 802.11 TSF

When the 802.11 TSF was deigned, the data rate for the 802.11 networks is only 1

Mbps or 2 Mbps. With that in mind, it is hard to envision that an 802.11 network is shared by hundreds of stations. However with introduction of 802.11b, the supported data rate is up to 11 Mbps. The 802.11a and 802.11g standards further elevate the data rate to 54 Mbps. The incoming 802.11n standard will push the data rate to over

100 Mbps. Under these new types of 802.11 networks, it is very likely that hundreds of stations can form an IBSS. Scalability becomes a legitimate issue. We will show that 802.11 TSF is not scalable through analysis in the next chapter. The 802.11 TSF

26 is designed without the consideration of scalability. It is very easy to see that 802.11

TSF is not scalable. All the stations try to send out a beacon frame in a small and

fix-sized window, collision is bound to happen. The chance of collision will increase quickly with the size of the IBSS.

3.3 Requirements of for Timing Synchronization in 802.11 Networks

The 802.11 networks pose some additional requirements for clock synchronization protocols. We summarize here to help understand the design and implementation of our proposed solutions in the subsequent chapters.

• Effective (in terms of synchronization accuracy): Many 802.11 implementations

assume that the TSF is able to synchronize clocks to be within 25µs. When-

ever this assumption is not met at runtime, the network’s performance (e.g.,

throughput) degrades. It is, thus, highly desirable that the new TSF can al-

most always control the maximum clock offset (difference) within 25µs. The

requirement for multi-hop TSF should be in the same range after dividing the

maximum clock offset with number of hops.

• Compatible with the current 802.11 TSF: Given that 802.11 networks have been

widely deployed, it is desired that stations running the new TSF can seamlessly

form an IBSS with stations running the old (current) 802.11 TSF. As a critical

control frame, a received beacon is validated by the current 802.11 TSF protocol.

If the beacon contains additional fields, it may fail the validation and simply

be dropped. Therefore, it is important that the beacon format remains intact.

In addition, the performance of an IBSS of size x + y in mixed mode (with x

27 stations running the old TSF and y the new one) is desired to be comparable to

that of an IBSS of size x with all of its x stations equipped with the old TSF.

Compatibility is critical for single hop TSF. It is not very important in multi-

hop TSF since there is no standard established for multi-hop TSF. However,

the multi-hop TSF should follow the general framework of the single hop TSF

in order for the vendors to expand their 802.11 products easily into the area of

802.11-based multi-hop ad hoc networks.

• Highly scalable: The newly proposed 802.11n will support bandwidth of 200

Mbps or more. It is not unrealistic to expect an IBSS to contain up to several

hundreds stations in real life. An improved TSF should be able to handle at

least that many stations.

• Simple: Since the 802.11 TSF is typically implemented in hardware, any remedy

to the TSF should retain its current simplicity.

• Low cost: As 802.11 devices are targeted for mass markets, only inexpensive

hardware and software solutions are considered suitable.

• Mobility-tolerant: When new stations join or when old stations leave the net-

work, the protocol’s performance should not degrade by too much.

The compatibility requirement entails us to employ only existing fields in the beacon. The scalability and mobility handling are often conflicting. The require- ment of simple and low cost solutions excludes complex schemes. To meet all these requirements is a challenging task.

28 3.4 Formal Definition of the Minimum Dominating Set Prob- lem

Minimum dominating set schemes are widely used in multi-hop ad hoc wireless networks. It can be applied for broadcast storm mitigation[11] [41] [10], efficient routing [13] [47] [48] [46], and collision avoidance [45]. We define the problem as follows.

A multi-hop mobile ad hoc network (MANET) can be represented by an undi- rected graph G = (V,E), where V is the set of nodes (stations) in the graph, and E is the set of edges in the graph (radio links in the network). There is an edge between two nodes if and only the two nodes are within the transmission range of each other.

A dominating set DS ⊂ V is a set such that ∀v ∈ V , either v ∈ DS or there is a node u ∈ DS and there is an edge (u, v) ∈ E. A domination set with minimum number of nodes is called minimum dominating set (MDS).

The minimum dominating set problem is to find a MDS given a graph G = (V,E) for a MANET[38].

The connected dominating set (CDS) problem is to find a MDS given a connected graph G = (V,E) and the subgraph induced by the MDS is connected[17].

3.5 The Significance of the Minimum Dominating Set Prob- lem

The minimum dominating set problem is very important in wireless ad hoc net- works and has attracted a lot of research attentions. The stations in wireless ad hoc networks are devices with low power, limited bandwidth, and unrestricted mobility[46].

Due to the power and bandwidth restrictions of wireless ad hoc networks, information

29 collection becomes expensive. Therefore, routing poses special challenges. The tra- ditional routing protocols such as link state or distance vector routing are no longer suitable for wireless ad hoc networks. Routing information has to be localized to adapt the rapid changes due to the station mobility. The mobility of stations causes topol- ogy changes. Routing is more difficult in this dynamic environment. Dominating-set- based routing is a promising hierarchical routing approach. The main advantage of dominating-set-based routing is that only the stations in the domination set involve in the routing process. Only these stations need to keep routing information and the search space is reduced. Since the dominating stations are used to route the packets and to distribute routing information, the efficiency of dominating-set-based routing depends on how quick the CDS is constructed and how robust the CDS is maintained and how small the size the CDS. An efficient and adaptive CDS protocol is critical to solving the routing challenges in wireless ad hoc networks.

In a multi-hop mobile ad hoc network, broadcasting is a common operation in many applications. Due to the host mobility, broadcasting is expected to be per- formed more frequently (e.g., for paging a particular host, sending an alarm signal, and finding a route to a particular host). Broadcasting may also be used in LAN emu- lation or serve as a last resort to provide multicast services in networks whose topolo- gies change rapidly[43]. Since the global topology information is hard to gather and the global synchronization is very difficult, broadcasting is sometimes implemented by flooding. However flooding may bring serious redundancy, contention and colli- sion. The radio transmission coverage may overlap, many rebroadcasts are redundant.

Heavy contention could exist because re-broadcasting stations are probably close to

30 each other. Collisions are more likely since the timing of rebroadcasts is highly corre- lated. This problem is called broadcasting storm problem in a MANET. A minimum

CDS can greatly relieve the broadcasting storm problem. Only the stations inside the dominating set will forward the broadcasting request, therefore the contention is reduced.

Dominating set is also helpful in clock synchronization in a MANET. By allowing the stations in the DS compete more often and the stations outside the DS compete once in a while, the clock synchronization protocol can achieve high scalability while the dominating set helps to distribute the timing information of the fastest station to every station in the MANET. The construction of dominating set helps both the scalability of the clock synchronization protocol and the convergence time of the clock synchronization protocol[53].

3.6 Challenges of Solving the Minimum Dominating Set Prob- lem in Wireless Ad Hoc Networks

The MDS problem is NP-hard even in wired non-mobile networks[15] [18]. The

CDS problem is a harder problem than MDS, and therefore it is also NP-hard. The two problems are much hard in a MANET due to the mobility of stations. Since the bandwidth of wireless networks are typical less than wired networks and the power supply of the mobile stations is very limited, MDS and CDS protocols must be able to construct dominating sets with low communication and computation costs. These protocols must be scalable as the MANETS are usually deployed with large network size[44]. Dominating set construction protocols must be able to detect the topology changes quickly and re-construct a new dominating set as the previous dominating set becomes a non-dominating set or a connected dominating set becomes disconnected.

31 The maintenance of the (connected) dominating set is a big challenge in a MANET environment.

32 CHAPTER 4

ANALYSIS ON THE SCALABILITY OF 802.11 TSF

In this chapter, we will review the analysis of the beacon contention. The scalabil- ity problem of 802.11 TSF was first discovered in[19] by Huang and Lai. Analysis and simulation were done in[19] to show why the 802.11 TSF was not scalable. However the analysis assumed that the random delay timer would continue to count down even when a collision was detected. In the 802.11 standard, the random delay timer is suspended when the collision is detected. We performed the same analysis using the correct countdown procedure in[20]. The analysis results are the same for both

[19, 20]. We just summarize the results of the analysis. Please refer to [19, 20] for detail information. The numerical data presented in[19] was based on 802.11b, which has maximum data rate of 11 Mbps. Since the 802.11a standard can support 54

Mbps, it is more practical to present the scalability data in a higher rate network due to the fact that an 802.11a IBSS has the bandwidth to support hundreds of stations.

We focused our data analysis on 802.11a networks in[20].

We then investigate the root causes of the scalability issue and list a few possible solutions to set the stage for our proposed solutions in the next chapter.

33 4.1 Analysis of Beacon Contention

Suppose there are n stations, and the beacon generation window consists of w + 1 slots numbered 0 through w.

Let p(n, w) be the probability of the event E that at least one of the n stations succeeds in beacon transmission in window [0, w].

 w n  1   w n−1 p(n, w) = p(n, w − 1) + n w + 1 w + 1 w + 1   n n−i  i !j !n−i−j X X  n n−i 1 b − 1 w − b + 1  + Ci Cj p(n − i − j, w − b) i=2 j=0  w + 1 w + 1 w + 1  (4.1)

The boundary condition for p(n, w) is p(0, w) = p(n, 0) = 0, provided n > 1.

The value of b (i.e., the length of beacon frames in terms of slots) is calculated to be 13 for the FHSS system with 1 Mbps; and 4 for the 54 Mbps OFDM. The function p(n, w), calculated from Eqs. 4.1, is plotted in Fig. 4.1. The figure shows that for the

FHSS system (w = 30, b = 13), p(n, w) is smaller than 50% when n > 70, and for the

OFDM system (w = 30, b = 4), p(n, w) is lower than 50% when n > 115. This means that when n is not very small, there is a significant chance that no beacon frames are transmitted successfully in any given interval. As to be seen in the next section, this may cause some stations to become out of synchronization.

Let p0(n, w) denote the probability that a particular station, say A, successfully sends a beacon in a given beacon interval.

1 w p0(n, w) = X p0(n, w, k) (4.2) w + 1 k=0

34 1 W=30 b=4 W=30 b=13 0.9

0.8

0.7

0.6

0.5 p(n,W) 0.4

0.3

0.2

0.1

0 0 20 40 60 80 100 120 140 Number of Stations

Figure 4.1: p(n, w)

For n ≥ 3 and k ≥ b, the function p0(n, w, k) satisfies the following recurrence:

k−b n−1 n−1−x p0(n, w, k) = X X X {π(i, x, y) · p0(n − x − y, w − i − b, k − i − b)} i=0 x=2 y=0 w − k !n−1 + (4.3) w + 1

The boundary condition for p0(n, w, k) is p0(0, w, k) = 0 and p0(n, 0, k) = 0, where

 1 x b − 1 !y w − i − b + 1!n−1−x−y π(i, x, y) = C n−1C n−1−x (4.4) x y w + 1 w + 1 w + 1

Using Eqs. (4.2) and (4.3), the function p0(n, w) is plotted in Fig. 4.2 for various systems: the OFDM system (w = 30, b = 4),the FHSS system (w = 30, b = 13) and the DSSS system (w = 62, b = 12). It is interesting to note that the value of p0(n, w) is not sensitive to w and b. The number of stations is the dominating factor.

35 1 W=30 b=4 W=30 b=13 0.9 W=62 b=12

0.8

0.7

0.6

0.5 p'(n,W) 0.4

0.3

0.2

0.1

0 0 5 10 15 20 25 Number of Stations

Figure 4.2: p0(n, w)

4.2 Metrics for asynchronism

If the clocks of two stations differ so much that either power management or frequency hopping can not work properly, the two stations are said to be out of synchronization.

Let ∆ be the maximum clock difference tolerable by power management and

FHSS.

Assume that the clocks in an IBSS are all different in frequency, which is typically the case in real systems. Thus, there is a unique fastest station, whose clock is fastest in the system. We are particularly interested in these two situations:

36 • Fastest-station asynchronism — This refers to a situation where the fastest

station’s clock is ahead of all other stations’ clocks by more than ∆.

• Simple asynchronism – This refers to a situation where the fastest station’s

clock is ahead of the slowest station’s clock by more than ∆. The difference of

the fastest and slowest clock is called maximum clock offset.

For the first type of asynchronism, we are interested in analyzing the following:

• How often may asynchronism occur in an IBSS?

• Once asynchronism occurs, how long does it last?

We will use simulation to study the maximum clock offset of 802.11 TSF and our proposed TSF schemes later in the paper.

Let T be the length of each beacon interval, and let d denote the difference in

clock accuracy between the fastest station and the second fastest station. Suppose

all the stations in an IBSS are perfectly synchronized at one point of time. After

the synchronization, if the fastest station fails to transmit a beacon in d∆/(d · T )e consecutive beacon intervals, then the fastest node will be out of synchronization with all other stations by at least ∆ time units, resulting in a condition of fastest-station asynchronism. We will calculate E(H0), the expected duration of a fastest-station asynchronism event, and E(L0), the expected length of time between two consecutive incidents of fastest-station asynchronism. H0 and L0 are illustrated in Figure 4.3, where the shadowed ranges indicate asynchronous periods. E(L0) and E(H0) are answers to our “how often” and “how long” questions for fastest-station type of asynchronism.

37

£¡£¡£¡£

¡ ¡ ¡ ¡

¢¡¢¡¢¡¢¡¢ £¡£¡£¡£¤¡¤¡¤¡¤

¡ ¡ ¡ ¡

¢¡¢¡¢¡¢¡¢ ¤¡¤¡¤¡¤ t H L

Figure 4.3: H0 and L0

Given n, w, and τ = d∆/(d · T )e, let p0 denote the value of p0(n, w) as calculated in Eq. (4.2).

1 E(H0) = (4.5) p0

1 1 E(L0) = − . (4.6) p0(1 − p0)τ p0

4.3 Root Causes of Asynchronism and Some Possible Reme- dies

In order to improve 802.11 TSF’s scalability, we must first understand why it is not scalable. There are several reasons for this, all due to the protocol’s design.

• Beacon collision: The beacon contention window has a small number of slots.

Unless the IBSS only contains an extremely small number of stations, beacon

collision is deemed to occur with high probability.

• Diverse clock frequencies: The IEEE 802.11 specifications only require clock

accuracy to be within ±0.01%. With this degree of inaccuracy in clock fre-

quency, the fastest and the slowest clocks may possibly accumulate a difference

38 of up to 200µs per second without synchronization. There are three elements

that contribute to the inaccuracy of clocks [7]: starting frequency offset (due

to frequency calibration error), frequency drift (due to aging) and oscillator

noise. Given the typical operating environment and short life span of an IBSS,

frequency drift and oscillator noise are negligible compared to the starting fre-

quency offset. The starting frequency offset is the dominating factor for clock

errors.

• Inaccurate timestamp: It takes time for a beacon to travel from the sender’s

MAC layer (which sets the value of the timestamp on the beacon) to the re-

ceiver’s MAC layer (which uses the timestamp to synchronize its clock). When

the receiver synchronizes its clock according to the timestamp’s value, the latter

is already different from the sending TSF timer’s actual value at that moment.

To mitigate this problem, 802.11 [1] specifies that a station sending a beacon

shall set the value of the beacon’s timestamp so that it equals the value of the

station’s TSF timer at the time that the first bit of the timestamp is transmitted

to the wireless medium; while the received timestamp value shall be adjusted

by adding to it an amount equal to the beacon’s delay through the receiving

station’s local PHY components plus the time since the first bit of the times-

tamp was received at the MAC/PHY interface. This mechanism maintains the

timestamp value of the beacon and the timer value of the sending station to be

within 4 µs plus the maximum propagation delay through the wireless medium,

which adds up to about ±5µs.

39 • Unidirectional clocks: The 802.11 ad-hoc-mode TSF lets clocks move only for-

ward but never backward. A station synchronizes its clock with an arriving

beacon only if the timestamp on the beacon is later (larger) than the station’s

own clock. That is, roughly speaking, faster clocks can synchronize slower

clocks, but not the other way around.

• Equal opportunity: By design, all stations have the same opportunity to win

a beacon contention. This, together with unidirectional clocks, helps causing

asynchronism.

In order to fix the 802.11 TSF’s scalability problem, we need to remove one or more of its causes. There may be various ways to get around each of the above causes, but, unfortunately, not all of them work well. Before describing our proposed solutions, we wish to outline several unsatisfactory “solutions”, which would help the reader understand why we have designed the proposed protocols as they are.

• Reducing the beacon contention rate. Instead of contending every BP, a random

delay is introduced. It only contends for beacon transmission when the delay

timer is up. This scheme does not work well because the fastest station may

delay its contention for long time and cause the fastest clock to drift further

away from the pack.

• Let the fastest clock to contend every BP and other stations contend not fre-

quently (i.e. ATSP). It takes long time for ATSP to figure out who is the fastest

station, which may result in large maximum clock drift. This scheme does not

react well when the fastest station leaves the IBSS. It will take IBSS quite a

40 while to recognize the departure of the fastest station and select the next fastest

station.

• Allowing multiple beacon transmission in the same BP. This can help in the

situation that a slow station sends the beacon first and blocks a potential fast

station from sending out a beacon. But this solution alone cannot solve the

beacon collision problem when the number of stations is large.

• Allow stations to set their timers forward or backward as appropriate; i.e., no

matter which station wins the beacon contention, let all other stations synchro-

nize their timers with the beacon’s timing. This approach is undesirable for

two reasons. First, the collisions still happen quite often with large number

of stations. We will show in simulation that the improvement is limited. It

still suffers from the scalability problem. Second, it is incompatible with the

current 802.11 TSF. To see this, suppose the fastest station in the IBSS happen

to implement the current 802.11 TSF, while the rest of the IBSS happen to

implement the modified TSF. Also, suppose the fastest station and the slowest

station are currently out of synchronization, and the slowest station happens

to win the beacon contention, then the fastest station’s timer will stay intact,

while the others all synchronize with the slowest station. This would result in

more out-of-sync links.

4.4 Summary

We review the synchronization mechanism as specified in the IEEE 802.11 stan- dards. It is well-known that when the number of stations in an IBSS is not very

41 small, there is a non-negligible probability that stations may get out of synchroniza- tion. The more stations, the higher probability of asynchronism. In this sense, the current IEEE 802.11 synchronization algorithm does not scale; it cannot support a large-scale IBSS.

We then analyze the root causes of the scalability issue and list a few possible solutions to help the introduction of our proposed schemes in the following chapters.

42 CHAPTER 5

TIMING SYNCHRONIZATION PROTOCOLS IN A SINGLE-HOP 802.11 IBSS

5.1 Overview of Clock Synchronization Protocols

Clock synchronization is such a fundamental issue in communications networks; a lot of research efforts have been dedicated in this area. We will give an overview of the related research endeavors and explain why new protocols are still needed to address the scalability problem in 802.11 ad hoc networks.

This section surveys some existing synchronization algorithms and comments on their suitability/unsuitability as a solution to improving the 802.11 TSF’s scalability.

Lamport [24] proposed a method on logical time. The goal is to preserve the causal ordering of the events in a distributed system. The algorithm is then spe- cialized for the synchronization of physical clocks. The protocol assumes that every message will be received eventually. This can be achieved through message acknowl- edgement, message retransmission and adding sequence number. This will add a lot of complexity to the clock synchronization protocol. It is hard to adapt Lamport’s algorithm to the 802.11 TSF framework. In 802.11 TSF, beacons can be lost due to transmission error or beacon collision.

43 Mills [29] proposes a (NTP) to synchronize clocks and

coordinate time distribution in the Internet system. NTP is a hierarchical synchro-

nization protocol. The NTP system consists of a network of primary and secondary

time servers, clients, and interconnecting transmission paths. A primary time server

is directly synchronized to a primary reference source such as a timecode receiver or

a calibrated atomic clock. A secondary time server derives synchronization, possibly

via other secondary servers, from a primary server over network paths. Each time

server is defined by a number called stratum with primary server assigned as one and each succeeding level toward the leaves (secondary servers) assigned as one greater than the preceding level. The synchronization subnet is organized using a variant of the Bellman-Ford distributed routing algorithm to compute the minimum-weight spanning trees rooted at the primary reference sources. The distance metric is deter- mined first by stratum, then by total roundtrip path delay to the root. Most of the

802.11 devices have no access to primary reference source.

A time synchronism algorithm is proposed in [35] to deal with the network par- tition problem in sparse ad hoc networks. The basic idea of the algorithm is not to synchronize the local clocks but instead generate time stamps using unsynchronized local clocks. When such locally generated time stamps are passed between devices, they are transformed to the local time of the receiving device. The proposed protocol has a low resource and message overhead. However the transformations cannot be done with high precision, the maximum clock difference can be larger than 1000 µs.

This approach is suitable for sensor networks due to the low overhead. However, it is not a good choice for 802.11 TSF. 802.11 demands much better synchronization accuracy.

44 A different synchronization method called reference broadcast synchronization

(RBS) is presented in [14] for broadcast networks, especially for wireless ad hoc net- works. A reference broadcast or beacon does not contain an explicit timestamp; instead, its arrival time is used by the receivers as a point of reference for comparing their clocks. Since the instant where the message is received by all the stations in a broadcast network is the same, RBS can eliminate many sources of the time synchro- nization errors. The source of these errors can be characterized as the following four components[22]:

• Send Time - the time spent at the sender to create the message. This includes

the variable delays introduced by kernel protocol processing, context switching,

system call overhead and the time required for the message from the host to

the network interface.

• Access Time - delay incurred waiting for the access to the transmitting channel.

The CSMA-based MAC needs to wait for the medium to be idle before trans-

mitting. The RTS/CTS scheme used in 802.11 requires exchanges of control

frames before data transmission. TDMA channels require the sender to wait

for the designated slot before transmitting.

• Propagation Time - the time needed for the message to transmit from the sender

to the receiver once it has left the sender. The time is very small for broad-

casting networks such as Ethernet LAN and stations in an 802.11 IBSS. But

the propagation time dominates the delay in wide-area networks, where it in-

cludes the queuing and switching delay at each router and switch throughout

the network.

45 • Receive Time - processing time required for the receiver’s network interface to

receive the message and notify the host of its arrival.

An RBS broadcast is always used as a relative time reference. The physical time is never communicated. RBS relies on the collected observation from all the receivers and uses nontrivial statistical methods such as regression to estimate the clock phase offset and clock frequency offset of any two stations. RBS can achieve very accu- rate time synchronization, but it is hard to implement RBS under the 802.11 TSF framework.

A probabilistic method based on RBS is proposed in [31] to provide a statistical bound of clock accuracy for sensor networks. A diffusion-based method is proposed in [25] to achieve global synchronization in sensor networks. These schemes use elab- orated statistical tools to achieve certain objectives in sensor networks; and although interesting, they cannot be implemented in a compatible fashion under the 802.11

TSF framework.

A non-hierarchical network synchronization scheme based on the well known con- cept of mutual synchronization was proposed in [33]. Mutual synchronization is a clas- sic timing synchronization scheme based on multiple-input phase-locked-loop (PLL).

Every station sends a train of periodical pulses. All the received signals are averaged and used in a feedback loop to control the frequency of the local oscillator. Even though it can achieve very good accuracy of clock synchronization, according to [7], ensuring the stability of the control algorithms is a complex task. These types of solutions are very expensive and are, thus, applicable only in special cases such as military networks [7]. As such, the non-hierarchical network synchronization scheme

46 does not seem to meet the industry requirement of low-cost and simplicity. It does

not appear to be compatible with the current 802.11 TSF, either.

An interesting protocol called ASP is proposed in [37] for time synchronization

in 802.11-based multi-hop ad hoc networks. This protocol employs two strategies

to improve 802.11 TSF’s scalability: (1) let stations with faster clocks send beacons

more frequently, and (2) adjust clock frequency [27, 12]. The authors designed an

interesting algorithm to implement each of the two strategies. ASP is a big step

towards the goal of having a refined TSF meeting all the industry requirements laid

out in chapter 3. The requirements which, we believe, are still missed by ASP are

synchronization accuracy, compatibility, and simplicity. When applied to a (single-

hop) IBSS of up to 400 stations, ASP is able to synchronize clocks to around 60 µs, still more than twice as much as the industry desired 25µs. ASP adds a sequence number to the beacon, thereby changing the beacon format. As explained in section 3.3, even such a slight change in format may make ASP incompatible with the current

802.11 TSF. Simplicity (ease of implementation) is another area where ASP could be improved. In ASP, each station needs a table to keep track of all stations’ IDs and their last timestamp values in the IBSS. Both the memory requirement and implementation complexity could be undesirably high for a large scale IBSS.

5.2 ATSP: Adaptive Timing Synchronization Procedure

As specified in IEEE 802.11 TSF, the stations can only set their timers forward.

If the faster stations are given a higher priority to send beacon frames, the clocks will be synchronized better. ATSP was proposed in [19] based on this idea.

47 ATSP: Adaptive Timing Synchronization Procedure

1. Initially, for each station i, let I(i) be a random number between 1 and Imax and let C(i) := 1.

2. In each beacon interval, station i participates in beacon contention iff C(i) mod I(i) = 0.

3. Whenever station i receives a beacon with a timing value later than its own, the station sets its timer to this value, increases I(i) by 1 if I(i) < Imax, and sets C(i) := 0.

4. If station i does not receive any beacon frame with a timing value later than its own for Imax consecutive beacon intervals, it decrements I(i) by 1 if I(i) ≥ 2, and sets C(i) := 0.

5. At the end of a beacon interval, each station increases its C(i) by 1.

Figure 5.1: ATSP: Adaptive Timing Synchronization Procedure

Each station i is assigned an integer I(i) that determines how often each station shall participate in beacon contention. That is, station i contends for beacon trans- mission once every I(i) beacon periods. Therefore, smaller the value of I(i), higher the station’s chance of beacon transmission. Let the maximum possible value of I be

Imax. Let C(i) be a counter at station i that counts beacon periods. The proposed clock synchronization algorithm is described in the following.

With ATSP, once the clocks have been synchronized, the fastest station will not receive a timing value greater than its own; its I-value will gradually decrease to 1 and stay there. The other stations will gradually increase their I-values until they reach Imax. Define a stable state to be one in which the fastest station’s I-value has reached 1 and the other stations have reached Imax. Once the IBSS reaches a stable

48 state, the fastest station has a very high probability of successfully sending a beacon and thereby synchronizing all the other stations.

ATSP is a 2-layer master-slave protocol with the fastest clock as the master and the rest of the clocks as slaves.

ATSP is the first attempt to resolve the scalability problem of the 802.11 TSF. It achieves good scalability, as we will show in the performance study later. However, it does not handle the mobility very well. If the fastest station leaves the IBSS or crashes, it may take a long time to select the next fastest station. Large clock difference can occur during the process.

5.3 ABTSF: Adaptive bi-directional TSF

If we do not need to consider the compatibility issue and design the TSF from scratch, the bi-directional TSF can become a very good scheme with minor changes.

We call our proposed protocol ABTSF[51].

From our simulation, we can see collision is the major reason that causes the clocks to be out of synchronization. We need to reduce the collision by controlling the frequency of beacon contention. Each station competes for beacon transmission every Imax BPs. If Imax is large enough, the possibility of collision is very slim. But a large Imax increase the chances of idle when no station is competing for beacon transmission. So we introduce the concept of token. The token is assigned to the initiator of the IBSS first and the token is rotated among the stations periodically.

The token holder will compete for beacon transmission every beacon period and other stations competes for beacon transmission every Imax BPs. The token holder

49 802.11a Beacon Frame Extension

Time Stamp Beacon Interval ...... Token Bits

~ 550 bits 2 bits

Figure 5.2: Beacon Frame Format for ABTSF

consumes more power due to its frequency of beacon contention; rotation of token holder will distribute the power consumption.

Each station maintains a list of station IDs. These IDs are collected by deriving the source address of the beacon. When the token holder wants to release the token to another station, it randomly picks one station from the list and announces the new token holder. To implement the token, we extend the beacon frame format, adding two bits in the beacon frame. Fig. 5.2 shows the frame format. The token holder will set the token-bit to “10” and other stations set the token-bit to “00”. The token holder will set it to “11” when it starts the token rotation and the ID of the new token holder is also added in the beacon frame. A receiving station sets its token-bit to “10” if it sees a beacon with token-bit “11” and the new token ID in the beacon matches its own ID. When the old token holder sees a new beacon with token-bit

“10”, it resets the token-bit back to “00”.

When a station sees an idle beacon period, it implies the beacon holder leaves the

IBSS or crashes, each station sets its token-bit to “01” and contends to be the beacon holder. The station of the first successful beacon transmission with token-bit “01”

50 token bits role 00 none token holder 10 token holder 11 token holder releasing token 01 starting token contention

Table 5.1: Token bits explanation

will become the new beacon holder. Other stations will reset their token-bit to “00”

after receiving a beacon with token-bit “01”.

There is only one parameter to pick for ABTSF, Imax. Eq. 5.1 is used to select

Imax.

p(m, w) ≥ 0.95, m = 1 + dn/Imaxe (5.1)

Eq. 4.1 can be used to calculate the value of p(m, w), combing Eq. 5.1, the value

of Imax can be determined.

This solution is very scalable and adaptive to station mobility. The overhead is only 2-bit plus the new token ID at rotation time. The 2-bit addition can be considered free since this addition does not increase beacon length. The rotation happens once in a while. The overhead is also minor. We will show later in the simulation that the maximum clock offset can be controlled to be less than 50µs

for number of stations from 100 to 600. The movement of token holder has very

slim impact since the new token holder can be selected very fast. With ATSP, it

2 may take up to Imax BPs before the new leader is selected. For ABTSF, the first successful beacon transmission with token bit “10” marks the end of leader election.

51 The average BPs to elect a new initiator is:

E(leader) = 1/p(n − 1, w) (5.2)

From Fig. 4.1 we can see, E(leader) < 2 if 2 ≤ n ≤ 70 for 802.11b (w = 30, b = 4) and E(leader) < 2 if 2 ≤ n ≤ 115 for 802.11a (w = 30, b = 13). Remember that there is no need to elect a leader unless the token holder crashes. Even when the token holder does crash, it only takes a few beacon periods to elect a new leader.

5.4 TATSF: Tiered Adaptive Timing Synchronization Func- tion

5.4.1 Overview of TATSF

Now, suppose we must keep the IEEE 802.11 TSF’s provision of moving forward only. Since faster stations can synchronize slower stations but not the other way around, why not give faster stations a higher priority in the process of beacon gener- ation? We now propose a three-tier protocol called TATSF 3 to utilize this capability and handle station mobility more gracefully.

In order to classify the stations into different tiers, envision that the stations are ranked according to their frequencies, with the fastest station ranked number 1, the second fastest station ranked number 2, and so on. With such ranks, we can put those stations with rank 1 in S1, and those with ranks between 1 and some threshold in S2, and put the rest in S3. Unfortunately, precise ranks are not easy to obtain, and so we satisfy ourselves with an estimate. Each station divides the time line into observation periods — each consisting of OBS BPs, where OBS is a pre-specified integer. In each

3The time synchronization procedure proposed in [23] is a two-tier protocol, mobility handling is more refined by adding a tier.

52 TATSF: Tiered Adaptive Timing Synchronization Function

1. At the beginning of each BP, if C(i) ≥ I(i) then resets C(i) to zero and let station i participate in beacon contention.

2. [Initialization] If station i initiates a new IBSS, let I(i) := 1; otherwise, when it joins the (existing) IBSS, let I(i) := Imax2. In any case, let C(i) := random(0..I(i)).

3. Each station keeps an observation counter, its initial value is 0 when it joins the IBSS. The counter is incremented by one for each BP. When the counter reaches a pre-set value, the station is at the end of observation period and the counter is reset to 0.

4. At the end of each observation period, update I(i) as follows.

 1 if est rank(i) = 1  I(i) := Imax2 if 1 < est rank(i) ≤ THD   Imax4 if est rank(i) > THD

If there is an actual change in the value of I(i), let C(i) := random(0..I(i)).

5. At the end of each beacon contention window, update I(i) as follows:

  Imax4   if est rank(i) > THD   I(i) ∗ 2 I(i) :=  if there are collisions   min{I , dI(i)/2e}  max3  if the medium was idle

In any case, let C(i) := random(0..I(i)).

6. At the end of each BP, increment C(i) by 1.

Figure 5.3: TATSF: Tiered Adaptive Timing Synchronization Procedure

53 observation period, each station counts the number of stations — different stations

— from which it has received at least one beacon with a timing later than its own timer, and uses this number as an estimate of its rank. More precisely, at the end of each contention window, station i estimates/updates its rank as:

est rank(i) = 1 + the number of different

stations with faster beacons

received by i (5.3)

I(i) is an integer that indicates how often station i will participate in beacon contention. Its values is increased if collision happens or decreased if the medium is idle.

5.4.2 Analysis of TATSF

There are 5 parameters in the TATSF protocol: THD, OBS, Imax2, Imax3, Imax4.

The protocol’s performance hinges on the values of these parameters. Should THD =

OBS , Imax2 = 1, Imax3 = 1, and Imax4 = 1, the protocol degenerates to the current

802.11 TSF. This section discusses how to set these parameters.

Lemma 1 The fastest station is always in S1 except possibly for the first several BPs after it joins or initiates the IBSS.

Proof. Let f be the fastest station in the IBSS. When f joined the IBSS, it synchro- nized with some station, from which it heard a beacon. At that moment, f’s timer might or might not be the largest (latest). Let δ be the difference between f’s timer and the largest (latest) timer in the IBSS, and let d be the difference in accuracy between f’s timer and the second fastest timer in the IBSS. Then, at most a number

54 δ/(d·T ) of BPs after f joined the IBSS, f’s timer would be the latest and est rank(f)

would always be 1. Thus, As long as f stays in the IBSS, it will stay in S1 until a

new fastest station joins the IBSS. The case where f initiated the IBSS is similar.

In normal situation, tier 1 stations contend for beacon generation in every BP, and

on average there are |S2|/Imax2 tier 2 stations participating in each contention. The

number of beacon contenders from tier 3 can be ignored if Imax4 is set large enough.

On average, there are m = |S1| + |S2|/Imax2 contending stations in each BP. From

Eq. 4.1, the probability that at least one of the m stations wins the contention is more

than 0.95 if m ≤ 20. Whenever a station wins the contention, its beacon synchronizes

all timers with a smaller timing value.

Let ∆ be the desired accuracy of timing synchronization for the IBSS and L00 be the

time interval between two consecutive events of simple asynchronism. Then E(L00),

the expected length of L00 (in terms of the number of BPs), can be approximated

using Eq. 4.6, 1 1 E(L00) ≈ − (5.4) p0(m, w)(1 − p0(m, w))τ p0(m, w)

where τ = d∆/(d · T )e and d is the difference in accuracy between the fastest and

00 0 the slowest stations in S1 ∪ S2. Note that E(L ) approaches infinity as p approaches

1. In order to have a sufficiently large E(L00), it’s important that p0 be as large as possible. For instance, if ∆ = 100µs, w = 30, and d = 0.01%, then E(L00) ≈ 352 years, 141 days, 3 days, for p0 = 0.9, 0.8, 0.7, respectively.

The p0(m, w) in the above formula is the fastest station’s probability of winning a contention where m = |S1| + |S2|/Imax2, and w is the size of the beacon generation window. From Eq. 4.2, in order to obtain a value as large as 0.7 for p0(m, w), m must be less than 2. That is, |S1| + |S2|/Imax2 < 2, which implies |S2|/Imax2 < 1 (since

55 |S1| ≥ 1 by Lemma 1). On the other hand, it is desired that |S2|/Imax2 6= 0. To see this, suppose |S2|/Imax2 = 0. Then, |S2| = 0 or Imax2 = ∞. If Imax2 = ∞, then

S3 = ∅; should all stations in S1 leave the IBSS, all stations in S2 (i.e., all stations in the IBSS) will enter beacon contention and force many collisions. If |S2| = 0, then should all stations in S1 leave the IBSS, all stations in S3 will enter beacon contention, which is too slow. Thus, we wish S2 and Imax2 to satisfy

0 < |S2|/Imax2 < 1.

Imax2 should be small enough so that I(i) will reduce to 1 quickly in case the medium was idle. Desirably, log Imax2 ≤ 4.

Imax3 should be bigger than Imax2 but small enough so that I(i) will reduce to 1 quickly in case the all the stations in S1 and S2 leave the IBSS. Desirably, log Imax3 ≤ 5.

If all stations in S1 leave the IBSS, we want to quickly identify the new members of S1. In the worst case this process may take OBS BPs. Thus, OBS should not be too large, enen though the larger the value of OBS, the more accurate is est rank(i).

The value of Imax4 is more flexible than the other parameters as long as it is sufficiently large. Idealy, Imax4 > 2n.

We intended to let the fastest station to win the contention with a probability no less than 0.7. With such an odd for the fastest station, the stations in S2 would win no more than 0.3∗OBS contentions in an observation period. Therefore, THD should be no more than 0.3 ∗ OBS.

56 5.5 SATSF: Self Adjusting Timing Synchronization Function

5.5.1 Overview of Protocol

Given the reasons of asynchronism (as discussed in Section 4.3), two strategies

suggest themselves as natural approaches to improving the 802.11 TSF’s scalability.

The first strategy is to reduce the number of stations competing for beacon generation

(so as to alleviate beacon collision). (Note that in the current TSF, every station

participates in every beacon contention.) The second strategy is to adjust clock

frequencies so that all clocks in the IBSS have about the same accuracy (as apposed

to the 802.11 allowed inaccuracy of as much as ±0.01%). All previous attempts to improve 802.11 TSF’s scalability have adopted one or two of these strategies [37, 51].

While the two strategies are conceptually simple and straightforward, it is non- trivial to carry them out in a fashion that meets all the requirements and constraints specified in Section 3.3. As a matter of fact, none of existing solutions can achieve the 25µs requirement. Some of them are not compatible with 802.11 TSF. A new, compatible solution is needed to meet the industry expectation. Our goal here is to propose such a protocol.

To implement strategy 1, each station i maintains a variable FTT (i) to indicate whether i should participate in a beacon contention. It competes for beacon genera- tion if and only if FTT (i) = 0. We will design a rule for updating FTT (i).

To implement strategy 2, we need the following definitions.

Definition 1 Clock i’s native frequency, denoted as fn(i), is the number of ticks the

clock accumulates per second driven by its oscillator.

57 Note that each 802.11 timer has a native frequency within the range of (1 ±

0.01%) mega hertz (MHz). (Each timer ticks once per microsecond, but there is an

inaccuracy of up to ± 0.01%.)

Definition 2 Clock i’s frequency adjustment, denoted as fa(i), is the number of extra ticks per second that is added to the clock.

Definition 3 The sum adj freq(i) = fn(i) + fa(i) is the adjusted frequency of clock i.

For each station i, we will calculate a frequency adjustment fa(i), such that fn(i)+ fa(i) ≈ fn(fastest station). The basic idea behind the calculation of frequency adjustment is as follows. Suppose station i receives two beacons from station j, say, at times t1 and t2, respectively. From the timestamps on the beacons, station j’s

1 TSF timer values as of time t1 and t2 can be estimated — let them be TS (j) and

TS2(j), respectively. If it can be ensured that j’s timer had never been synchronized between the times it sent the two beacons. Then from the values TS1(j) and TS2(j), station j’s clock frequency can be estimated. If this estimated frequency is higher than station i’s own clock frequency, then i’s adjust its frequency to match j’s. This way, all stations can eventually have their adjusted frequency matching the fastest station’s clock frequency.

There are two design issues in the above frequency adjustment mechanism. First, how to ensure that j’s clock had not been synchronized between the times it sent the two beacons? This problem would be trivial if one is allowed to add any necessary information to beacons. (For instance, in [37] sequence number is added to the beacon.

The sequence number is incremented each time a station is synchronized by another

58 station. If the sequence numbers are the same, then the station is not synchronized

by other stations.) However, by the compatibility requirement, it is desired that no

changes are made to the current 802.11 frame format. Additional information such as

sequence number is not permitted. Under this constraint, the problem is nontrivial

and more interesting.

We will propose a simple solution to this problem. The basic idea is to disallow

a station to send any beacon for a certain amount of time, say τ, once its clock is

synchronized by other stations. This way, if two beacons from j arrive within a time span shorter than τ, we know j’s clock was not synchronized between its two beacon transmissions.

The second issue is that when station i adjusts its clock frequency to match j’s, it is important to ensure that i does not overdo it. That is, i’s adjusted frequency must not be higher than j’s frequency. For if stations may over-adjust their frequencies, then their (adjusted) frequencies may get higher and higher and eventually run out of the 802.11-allowed range of 1 + ± 0.01% mega hertz (MHz). When this happens, the performance of the time synchronization function will degrade, especially when the IBSS contains nodes with the old TSF.

We overcome this problem by taking into consideration the inaccuracy of times- tamps on beacons. According to the 802.11 specifications, the timing information carried by the timestamp may be inaccurate by as much as ±5µs. Thus, denoting

1 2 by T (j) and T (j) station j’s actual timer values as of times t1 and t2, respectively, where t1 and t2, as before, are the times when j’s two consecutive beacons arrive at a station, we have |T 1(j) − TS1(j)| ≤ 5 µs and |T 2(j) − TS2(j)| ≤ 5 µs. To avoid over- adjusting a station’s frequency, we will estimate station j’s frequency conservatively

59 by (TS2(j) − δ) − (TS1(j) + δ) T 2(j) − T 1(j) ≤ = adj freq(i), t2 − t1 t2 − t1 where δ = 5µs. By adjusting i’s clock frequency to this conservatively estimated frequency of j, we guarantee the i will never over-adjust its frequency.

5.5.2 Detailed Description of Protocol

With the above overview, we now describe the proposed protocol in detail. We

first define the variables to be used in the protocol.

• T (i): TSF timer value of station i.

• SK(i): clock frequency adjustment for station i. The amount SK(i) ∗ 106 is an

estimate of fa(i), and will be added to T (i) per second.

• FTT (i): this variable controls whether station i should compete for beacon

generation. It does iff FTT (i) = 0.

• TS(j): when station i receives a beacon from station j, TS(j) indicates the

adjusted timestamp value obtained from the beacon. (It is the sum of the

timestamp value in the beacon plus the receiving PHY layer delay and the time

since the first bit is received at the receiver’s PHY/MAC interface.) TS(j) is

used by i to estimate j’s timer value, T (j).

• ±δ: the maximum error that may occur when we estimate the value of T (j) by

TS(j). That is, |T (j) − TS(j)| ≤ δ µs when j’s beacon arrives at the receiving

station’s MAC layer.

60 • ∆NT (i): the amount of time (native time) since the last time station i received

a beacon with a faster timestamp; i.e., the number of ticks according to its

native frequency (without frequency adjustment).

• IND(i): station ID (index) of the station from where station i last received a

faster beacon.

• PV (i): protocol version of station i, 1 if the station i is running the new protocol

(SATSF); 0, otherwise. Protocol version is a 2-bit field in the current 802.11

frame control field. It is an existing field of the current beacon frame[30].

• sync T −(i): the timer value of station i before being synchronized by a faster

beacon.

• sync T +(i): the timer value of station i after being synchronized by a faster

beacon.

• last sync T +(i): the timer value of station i the last time after being synchro-

nized by a faster beacon.

SATSF: Self Adjusting Timing Synchronization Function

1. Initially, when station i joins the IBSS, let SK(i) ← 0, IND(i) = −1,

FTT (i) ← random(Imax1,Imax2). T (i) ← 0 if station i is the initiator of the IBSS;

else T (i) ← TS(j) − δ if i joins the IBSS by hearing a beacon from station j.

2. If FTT (i) > 0, station i will not compete for beacon transmission.

3. If FTT (i) = 0, station i is ready to compete.

4. At each TBTT each station that wants to compete for beacon transmission calculates

a random delay uniformly distributed in the range [0, w].

61 5. The station waits for the period of the random delay.

6. When the random delay timer expires, if the medium is idle, the station transmits

a beacon with a timestamp; else if it receives a beacon before its random delay timer

expiration, it cancels the pending transmission and the remaining random delay.

7. Upon receiving a beacon from station j, a station i performs:

if T (i) ≤ TS(j) − δ then

sync T −(i) ← T (i)

sync T +(i) ← T (i) ← TS(j) − δ

if [IND(i) = j] and [PV (j) = 1] and [sync T +(i) − sync T −(i) ≥ 2δ] and

− + [sync T (i) − last sync T (i) < dlog2 Imax1e × aBeaconP eriod] then n  . o SK(i) ← max SK(i), sync T +(i) − last sync T +(i) − ∆NT (i) − 2δ ∆NT (i)

IND(i) ← j

last sync T +(i) ← sync T +(i)

∆NT (i) ← 0

FTT (i) ← random(Imax1, Imax2)

if T (i) ≥ TS(j) + δ and PV (j) = 1 then

FTT (i) ← dmin(Imax1,FTT (i))/2e

8. If SK(i) > 0, station i increments T (i) by 1 every d1/SK(i)e µs (in terms of station i’s

native time).

9. At the end of a beacon period,  0 if FTT (i) = 1 or FTT (i) = 0  FTT (i) = dFTT (i)/2e if the medium was idle for the BP and FTT (i) > 1  FTT (i) − 1 otherwise 10. ∆NT [i] increments by 1 whenever station i’s oscillator ticks.

Of these variables, the following three are most important: T (i), FTT (i), SK(i).

Our protocol is all about how to maintain these three variables. We change the

62 TSF timer value of the receiving station i (T (i)) when we are sure that the sender’s timer is faster. We modify the FTT value to allow or disallow a station to compete for beacon transmission. We reset frequency adjustment (SK) only when we are

sure the sender’s clock frequency is faster. We use conservative procedure to avoid

over-adjusting clock frequencies.

When station i receives a beacon from station j, it checks whether TS(j) − δ ≥

T (i). Here TS(j) − δ is a conservative estimate of T (j), station j’s timer value. If

the estimated T (j) is greater (later) than i’s own timer value, then T (i) is updated

to TS(j) − δ. At the same time, the values of T (i) right before, and right after, the

update are recorded in sync T −(i) and sync T +(i), respectively, for later use.

The station (i) then checks the following conditions to decide whether it should

update its frequency adjustment SK(i).

• First, it checks whether its last clock synchronization was also prompted by j’s

beacon, by checking whether IND(i) = j, where IND(i) is a variable used

to indicate the source of the last beacon which prompted i’s synchronization.

If IND(i) = j, then station i has received two beacons from j each with (es-

timated) timing value greater than i’s own timer value. Station i is able to

estimate j’s clock frequency.

• Second, to make sure that j’s clock was not reset (synchronized by other sta-

tions) between the times of sending the two beacons, the protocol further checks

if the following condition is satisfied:

− + [PV (j) = 1] and [(sync T (i)−last sync T (i)) < dlog2 Imax1e×aBeaconP eriod]

63 We will show in lemma 3 that if the above condition holds then j’s clock was not

synchronized by any other stations between sending the two beacons if station

j is running the new version of TSF.

• Third, if sync T +(i) − sync T −(i) ≥ 2δ, we are sure station j advances faster

than station i (we will show it shortly in the proof of theorem 1).

If all of these conditions are satisfied, then station i’s current frequency adjustment

is too small, and should be recalculated. Recall that station i’s frequency adjustment

is 106SK(i) — that is, 106SK(i) ticks are added to T (i) per second, or equivalently,

1 tick added to T (i) per d1/SK(i)e µs. (Here second and µs refer to station i’s native

time.) SK(i) is updated as the following if the newly calculated value is bigger

(sync T +(i) − last sync T +(i)) − ∆NT (i) − 2δ SK(i) := . (5.5) ∆NT (i)

This formula is explained in the following. Recall that station i has received two

beacons from j. Let TS1(j) and TS2(j) be the adjusted timestamp values carried in

the two beacons. TS1(j) and TS2(j) are an estimate of j’s actual timer values, T 1(j)

and T 2(j), with a maximum error of up to ±δ: TS1(j) − δ ≤ T 1(j) ≤ TS1(j) + δ and

TS2(j) − δ ≤ T 2(j) ≤ TS2(j) + δ.

Station i’s native frequency and station j’s adjusted frequency differ by no more

than ((TS2(j) − δ) − (TS1(j) + δ)) − ∆NT (j) , ∆NT (j) which leads to Eq. 5.5. SK(i) is used in Step 8 of the protocol, which states that after every d1/SK(i)e ticks, T (i) adds one additional tick to itself.

The value of FTT is used to decide whether a station competes for beacon transmission. Station i competes for beacon transmission when, and only when,

64 FTT (i) = 0. In Step 1 of the protocol, when a station first joins the IBSS, its FTT is initialized with a random value and the station does not compete right way.

Station i will reset FTT (i) if it receives a beacon from station j with a larger clock value (T (i) ≤ TS(j) − δ). This rule is designed to inhibit the beacon transmission from slower stations. If only a small set of stations competes for beacon transmission, we can avoid the repetitive beacon collisions. This can help the scalability of the protocol. The value of FTT is set to half if the medium is idle for the whole contention window. Normally, the medium should not be idle. It happens only when the stations that were competing for the beacon transmission (faster stations) left the IBSS all together. By reducing the FTT value by half each time, some of the stations will be able to compete beacon transmission soon. A new set of fast stations will be selected as a result. FTT (i) is set to dmin(Imax1,FTT (i))/2e after a beacon is received by station i and station i is sure that it has a larger clock value than the station sending the beacon. This scenario happens when a new station with fastest clock joins an

IBSS. This rule allows the new fastest station to compete very soon.

We can see that all the variables used in the protocol are either local variables to the station itself or existing fields in the current beacon frame. There is no need to add or change any field of the 802.11 beacon frame. It is very important for compatibility of the TSF protocol. Certain implementations of the 802.11 TSF may not be ale to receive the beacon frame from a new protocol correctly if the beacon format is changed.

65 5.5.3 Analysis of Protocol

In this section, we show that the adjusted frequencies of all stations in an IBSS are

non-decreasing, and are bounded by the station with the highest native frequency.

As a result of this, adjusted clock frequencies will tend to get closer each time an

adjustment is made. This property is a major reason why SATSF is expected to

perform well, even in a mix-mode environment.

Suppose that station i synchronizes its timer, T (i), on receiving another station

j’s beacon. We show in the following lemma that at the moment right after the

synchronization (i.e., when T (i) is updated to TS(j) − δ in step 7 of the algorithm),

the values of the two stations’ timers are related by T (i) ≤ T (j) ≤ T (i) + 2δ.

Lemma 2 If station i synchronizes its clock with station j, then at the moment right

after the synchronization, it holds that T (i) ≤ T (j) ≤ T (i) + 2δ, or, equivalently,

sync T +(i) ≤ T (j) ≤ sync T +(i) + 2δ.

Proof. At the moment of synchronization, it is known by assumption (or by the definition of δ) that

|T (j) − TS(j)| ≤ δ. (5.6)

During synchronization, station i sets its timer as

T (i) := TS(j) − δ. (5.7)

The lemma follows directly from Eqs. 5.6 and 5.7 and the fact that T (i) = sync T +(i)

at the moment right after the synchronization.

Lemma 3 For a station running the new version of TSF, once the station synchro-

nizes its timer with another station, it will not compete for beacon transmission for

at least dlog2 Imax1e BPs.

66 Proof. According to the protocol, whenever a station, say i, synchronizes its timer

with some other station, it sets FTT (i) to a value no less than Imax1. After that, as

FTT (i) may decrement by no more than 50% per BP (except when FTT (i) = 1), it

will take at least dlog2 Imax1e BPs to reach 0.

Clock frequency adjustment, fa(i), is defined in Definition 2 as the number of extra ticks per second (in terms of reference time). In the protocol, an extra tick is added to the clock per every d1/SK(i)e microseconds (in terms of station i’s native

time). The next lemma establishes the exact relationship between fa(i) and SK(i),

if we ignore the ceiling of d1/SK(i)e.

Lemma 4 For each station i, fa(i) = fn(i) ∗ SK(i) and adj freq(i) = fn(i) + fn(i) ∗

SK(i).

Proof. Based on the calculation of SK(i), SK(i) is the adjustment per microsecond

in terms of station i’s native time. fn(i) is the number of native microseconds per

reference time second. fn(i) ∗ SK(i) is the number of ticks added per reference time

second. Therefore, fa(i) = fn(i)∗SK(i) and, thus, adj freq(i) = fn(i)+fn(i)∗SK(i).

The following theorem shows that the adjusted frequency of each station is bounded

by the frequency of the station with the highest native frequency. In addition, the

adjusted frequency of each station is non-decreasing. This means that each station

inches toward the frequency bound with each adjustment of SK. These properties

ensure good accuracy of SATSF and enable the protocol to work properly even in a

mixed environment where a few stations runs the 802.11 TSF and the rest are run-

ning the new protocol. The theorem assumes that clocks’ native frequencies do not

67 change during the life-span of the IBSS. This assumption is realistic because clocks’

frequency drifts due to aging and oscillator noises are negligible for a typical IBSS

(which has a short life span).

Theorem 1 For all stations i in the IBSS, adj freq(i) is non-decreasing as a func-

tion of time. Furthermore, adj freq(i) ≤ fn(s0) for all i, where s0 is the station with

the highest native frequency that has ever joined the IBSS. (Note that s0 may still be

in the IBSS or may have left).

Proof. Since SK(i) := max{SK(i), ...}, SK(i) is obviously non-decreasing as a func-

tion of time. It then follows from Lemma 4 that adj freq(i) is also non-decreasing.

To establish the bound adj freq(k) ≤ fn(s0) for all k during the life-span of the

IBSS, it suffices to show the following: (1) the bound holds at the IBSS’s inception,

which is obviously true, and (2) if the bound holds up to the time when a station is

about to update its SK, then after the update the bound is still valid. To prove the

latter statement, consider the event that station i adjusts SK(i) upon receiving a bea-

con from station j. As the induction hypothesis, assume adj freq(k) ≤ fn(s0) for all k

(in particular, adj freq(j) ≤ fn(s0)) before the SK(i) update. Since adj freq(j) does not change during the event, it is sufficient for us to show adj freq(i) ≤ adj freq(j)

after the SK(i) update.

According to the protocol, station i may adjust its SK only if PV (j) = 1, i’s timer

has been synchronized twice in a row by j (through j’s beacons) within dlog2 Imax1e BPs and

sync T +(i) − sync T −(i) ≥ 2δ. (5.8)

68 Let t1 be the time (of a reference clock) of the last timing synchronization and t2 be that of this timing synchronization. Let T 1(j) and T 2(j) be the values of T (j)(j’s

TSF timer) as of t1 and t2, respectively. Let ∆t = t2 − t1.

First, we observe that station i’s timer does not synchronize with any other station

during the interval (t1, t2) (except for the two synchronizations in question that occur

at t1 and t2). This is a result of the mechanism of IND(i), which indicates from

whom the station was synchronized for the last time. Second, we claim that during

the period (t1, t2), station j’s clock has never been synchronized by other stations

either. This is due to Lemma 3, which indicates that if j’s clock is synchronized

by any other during (t1, t2), it would not have been able send a beacon to trigger

the current synchronization to i. Thus, over the period (t1, t2), timer T (j) has been

ticking at its adjusted frequency, adj freq(j), and has advanced from T 1(j) to T 2(j).

Therefore, T 2(j) − T 1(j) adj freq(j) = . (5.9) ∆t By Lemma 2, T 2(j) ≥ sync T +(i) and T 1(j) ≤ last sync T +(i) + 2δ. Substituting

these into Eq. 5.9 yields

sync T +(i) − last sync T +(i) − 2δ adj freq(j) ≥ . (5.10) ∆t

On the other hand, adj freq(i) can be computed as follows. Let ∆NT (i) refer to its

value as of time t2. Then, ∆NT (i) + ∆NT (i)/(1/dSK(i)e) adj freq(i) = ∆t ∆NT (i) + ∆NT (i) ∗ SK(i) ≤ (5.11) ∆t

By definition,

SK(i) = (sync T +(i) − last sync T +(i) − ∆NT (i) − 2δ)/∆NT (i)

69 Substituting this into Eq. 5.11, we obtain

sync T +(i) − last sync T +(i) − 2δ adj freq(i) ≤ (5.12) ∆t

Eqs. 5.10 and 5.12 together imply adj freq(i) ≤ adj freq(j).

Now we want to present an optional feature to the base SATSF protocol. This feature allows a station i to adjust SK(i) if it receives two faster beacons from station j in two consecutive beacon periods while PV (j) = 0 and sync T +(i)−sync T −(i) ≥

2δ.

If we assume that a successful beacon will be received by all the stations in the

IBSS, then this feature can be turned on safely. SATSF still can maintain the fre- quency adjustment bound. The reason is that station j’s clock cannot be reset by any another station during these two consecutive beacon transmission. According to step 6 of the protocol, a station cancels its timer when it receives a beacon. Only one successful beacon can be sent per beacon period. If this assumption is not always true, the probability that station j’s clock is reset in the same beacon period after it sends out a faster beacon is very low. For practical reason, it is still good to turn the feature on.

There are two parameters used in SATSF: Imax1 and Imax2. Imax1 should be small enough to allow other stations to compete when the fastest station leaves the IBSS; it should be large enough to allow the fastest station has the chance to send out two beacons so that other stations can adjust their frequencies of the clocks. Since we use binary close-up procedures, we can set Imax1 to 8 or 16.

Imax2 is used to spread the stations so that the FTT will not become 0 at the same time when the fastest station leaves. A value close to the number of stations in

blognc an IBSS should be a good choice. We can pick Imax2 = 2 2

70 5.5.4 Comparison between ASP and SATSF

Both ASP [37] and our SATSF let the faster clocks send out beacons more fre- quently than slower clocks, and try to improve synchronization accuracy by adjusting clocks’ frequencies. These are two basic strategies to attack the root cause of the scalability issue of time synchronization. They are different in their ways to carry out the strategies.

For ASP, each station i calculates a value pi as below, and competes for beacon transmission every pi BPs:

$ !α% max(1,NBi) pi = (5.13) max(1,NLi)

0 0 where NBi is number of i s neighbors and NLi is number of i s neighbors who’s TSF timer equals to or is slower than that of station i.

It learns of the speed of neighbor TSF timers by listening for beacon transmission.

If α is big, then most of the stations will not compete very often, then the estimation of NLi will not be accurate. If α is small, then a lot of station may compete for beacon transmission quite often. ASP does not have exact control over who competes and who does not due to the inaccuracy of the estimation of NLi. To track the clock ranking of the neighbors, each station maintain two tables that add complexity and memory cost. Before knowing the exact number of neighbors and ranking of the neighbor’s clock speed, pi = 1. A lot of collisions may occur during this period. ASP may be slow to converge if the number of stations is large.

For SATSF, it uses a FTT variable to control whether it competes or not. Initially, it is not competing. A station competes for beacon transmission only after its FTT becomes 0. Its FTT will not become 0 as long as it receives a faster beacon. Normally,

71 only the fastest station(s) will send out beacon. This property helps SATSF to achieve

great scalability. It uses a binary close-up procedure to handle mobility. A new leader

will be selected quickly when the fastest station leaves the IBSS.

If a station i receives two faster beacons from station j, both ASP and SATSF

adjusts station i’s frequency to match that of j. To ensure j’s clock is not reset during the interval, ASP adds a sequence number to the beacon. The sequence number of a station will be incremented by one if its clock is reset by another station. Station i can adjust frequency if the sequence number of j is the same in both of the beacons. While this solution is logically correct, it violates the compatibility requirement and may not work well in a mix mode IBSS. Another problem with the way ASP adjusts frequency is that it does not consider the estimation error between the TSF timer and the beacon timestamp. Consequently, a slower station may over-adjust its frequency such that the adjusted frequency is higher than the frequency of the previously fastest station.

This process may repeat many times and the synchronization accuracy will suffer greatly if a few stations are running the current 802.11 TSF. As 802.11 TSF stations do not adjust frequencies, the unbounded frequency adjustment of ASP means big clock offset among stations in mixed mode.

SATSF handles frequency adjustment effectively. It considers the estimation error of timestamps and adjusts clock frequency in a conservative and bounded way. It can make sure that station j’s clock is not reset during the two faster beacons without adding any field to the beacon. Based on the properties shown in Lemma 3, station i is sure that station j’s clock is not reset by another other station if the two faster beacons are received within dlog2 Imax1e BPs.

72 These differences in design strategies translate to differences in performance, as

to be seen in the next section.

5.6 Performance Studies

In the simulation, we let the clock speed to be uniformly distributed in the range

of [−d, d]. We pick d = 0.01%. This is a very inaccurate clock. It is the worst

clock accuracy allowed by the 802.11 standard. Due to the low cost nature of 802.11

devices, inaccurate clock with d = 0.01% is often used in these devices. We also study

the impact of packet transmission error and mobility of stations.

We run the simulation for OFDM systems: w = 30, b = 4. The desired accuracy of

timing synchronization (∆) is 100µs. We use the result of our analysis as the guideline

to pick the parameters of TATSF: THD = 3, OBS = 10, Imax2 = 16, Imax3 = 32 and

Imax4 = 2048. For ABTSF, we set Imax = 16 when n ≤ 200; 32 otherwise according to Eq. 5.1.

We set up our simulation as follows:

• We run the simulation for 10000 beacon periods.

• We set the packet error rate to be 0.01%.

• The accuracy of receive timestamp is to within ±5µs of the reported clock time.

The local clock is updated only when receiving a faster timestamp that is more

than 5µs .

• We let 5% of the fastest stations leave at beacon period k ∗2000 ( k > 1 ). They

return after 500 beacon periods.

73 binum max offset average max offset 0 4408 µs 1770 µs 10 4335 µs 1470 µs 50 5227 µs 2047 µs 100 5221 µs 2053 µs 200 1564 µs 226 µs

Table 5.2: Maximum clock offset of bi-directional TSF for n = 200

We measure the performance by the largest clock offset between the fastest clock and slowest clock in the IBSS during the whole simulation period. The performance metric we use is simple asynchronism. The reason is that fastest-station asynchro- nism and global asynchronism rarely happen for all the proposed protocols except

802.11 TSF, only simple asynchronism can distinguish the best protocols among the improved schemes.

5.6.1 Simulation results for 802.11 TSF/ Bi-directional TSF

Fig. 5.4 shows the maximum clock offset for 802.11 TSF when n = 100. We can see the maximum is more than 1000µs. Fig. 5.5 shows the maximum clock offset for

802.11 TSF when n = 200. We can see the maximum is more than 4000µs. It is very clear that 802.11 TSF is not scalable.

Bi-directional TSF is the same as 802.11 TSF except that the clock will reset its value whenever a beacon is received regardless which clock is faster. We compare the maximum clock offset in a IBSS where some stations run 802.11 TSF and some run bi-directional TSF.

Let binum be the number stations running the bi-directional TSF. When binum =

0, it becomes 802.11 TSF. When binum = n, then all the stations run bi-directional

74 1200 802.11 TSP n= 100

1000

800

600 max clock offset(us) 400

200

0 0 2000 4000 6000 8000 10000 Number of BPs

Figure 5.4: Maximum clock offset for 802.11 TSP

5000 802.11 TSP n= 200

4500

4000

3500

3000

2500

2000 max clock offset(us)

1500

1000

500

0 0 2000 4000 6000 8000 10000 Number of BPs

Figure 5.5: Maximum clock offset for 802.11 TSP

75 TSF. It is a mixed mode when binum takes other value. Table 5.2 shows the max-

imum and average clock offset for bi-directional TSF when n = 200. The maximum

offset is still over 1500µs when running in complete bi-directional mode. It is a good improvement from the 802.11 TSF where the maximum offset is over 4000µs , but still

not good enough. When n = 300, the maximum offset will be over 20000µs. In mixed

mode, the performance is more or less at the level of 802.11 TSF. The scalability issue

is still not resolved.

5.6.2 Simulation results for ATSP

We focus our study on the effect of the fastest node leaving the IBSS. We let

the ATSP run to a stable condition and then start observing after the fastest node

leaving. We record the maximum offset for the next 5000 beacon periods.

Fig. 5.6 shows the maximum clock offset when Imax = 10. We can see the small

Imax cannot stabilize the clocks. Even though the fastest clock contents every beacon

period and other stations content every 10 beacon periods, the possibility of collision

is still high that leads to higher maximum clock offset between the fastest clock and

the slowest clock.

Fig. 5.7 shows the maximum clock offset when Imax = 100. We can see the stations

stabilize slowly, but after they stabilize, the clock offset is much more controlled.

Small Imax is not stable but the fastest station can reach the leader position

quickly, large Imax can keep the clock synchronized but converges slowly after the

fastest clock leaves. Ether way , we can not keep the maximum offset under 100µs.

76 500 ASTP Imax = 10 n= 300

450

400

350

300

250

200 max clock offset(us)

150

100

50

0 0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 Number of BP

Figure 5.6: Maximum clock offset for ATSP

600 ASTP Imax = 100 n= 300

500

400

300 max clock offset(us) 200

100

0 0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 Number of BP

Figure 5.7: Maximum clock offset for ATSP

77 80 TATSP n= 400

70

60

50

40

max clock offset(us) 30

20

10

0 0 2000 4000 6000 8000 10000 Number of BP

Figure 5.8: Maximum clock offset for TATSF

For ATSP, it is difficult to pick the value of Imax. If Imax is small, then it is not scalable. If the Imax is large, it takes long time to find the fastest station. Either way, the maximum clock offset can be over 500 µs.

5.6.3 Simulation results for TATSF/ ABTSF

Table 5.3 shows the maximum clock offset for TATSF and ABTSF with n ranging from 100 to 600. Fig. 5.8 shows the maximum clock offset during each beacon period for TATSF when n = 400. Fig. 5.9 shows the maximum clock offset during each beacon period for TATSF when n = 600.

78 90 TATSP n= 600

80

70

60

50

40 max clock offset(us) 30

20

10

0 0 2000 4000 6000 8000 10000 Number of BP

Figure 5.9: Maximum clock offset for TATSF

The improvement over 802.11 TSF is quite large for both TATSF and ABTSF.

We can see the maximum offset does not increase with the number of stations. It is very scalable.

To our surprise, the maximum offset cross the 100µs mark. When we rerun the same simulation with Imax2 = 4, the maximum offset drop to 82 for 100 stations. It seems not consistent with the analysis. According to the analysis, |S1| should be close to 1 with a larger Imax2. The fastest station is in contention every beacon period, the clock should be very synchronized. That is true when the timestamp can be trusted at face value and the air interface is error-free. In the simulation, when a station receives a timestamp that is faster than its local clock but less than 5µs faster, the receiving station will not increase est rank. So it is possible, there are multiple stations in S1.

79 n TATSF max offset ABTSF max offset 100 102 µs 39 µs 200 93 µs 41 µs 300 84 µs 41 µs 400 78 µs 42 µs 500 88 µs 41 µs 600 81 µs 41 µs

Table 5.3: Maximum clock offset of TATSF and ABTSF

The average size of |S1| is 6.2 and the average size of S2 is 19.7. When all the stations

in S1 leave the IBSS, the stations in S2 can quickly become member of S1 with a small Imax2. We can avoid multiple rounds of idle under these situation.

Packet errors and movement of satiations have bad impact in term of maximum clock offset. The impact is much limited due to the adaptive nature of TATSF. For example, the maximum offset for 400, 600 stations can be reduce to 72,74 µs with stationary IBSS and error-free radio channels. Our assumptions are very conservative.

In the real life, maybe only one station in S1 leaves during one beacon period. We let all the stations leave at the same beacon period and the impact is still very limited.

5.6.4 Simulation results for ASP and SATSF

Simulation results for ASP

We ran the simulation with α = 3 as it is the preferred value by [37]. Fig. 5.10 shows the maximum clock offset during each beacon period for ASP when n = 200.

We show the maximum clock offset starting from beacon period 50 to ignore the initial clock offset before the protocol stabilizes. It shows good improvement over

80 60 ASP n= 200

55

50

45

40

35 max clock offset(us) 30

25

20

15 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 Number of BP

Figure 5.10: Maximum clock offset for ASP

the 802.11 TSF but it still has large clock offset. It can be over 50µs. It does not

address the scalability issue completely. Fig. 5.11 shows the maximum clock offset

during each beacon period for ASP when n = 200 and one of the station is running

802.11 TSF. With one non-compliance station, the maximum offset increases about

300%. It can be over 150 µs. Due to the fact of un-bounded frequency adjustment,

the clocks can have large offsets in mixed mode.

Simulation results for SATSF

We ran the simulation for our new protocol SATSF with δ = 5, Imax1 = 8 and

blognc Imax2 = 2 2 .

81 160 ASP n= 200 with 1 non-compliance node

140

120

100

80

max clock offset(us) 60

40

20

0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 Number of BP

Figure 5.11: Maximum clock offset for ASP with one non-compliance station

Fig.5.12 shows the maximum clock offset for an IBSS with 200 stations. We can see from Fig.5.12 that SATSF can synchronize the clocks very precisely. The maximum clock offset is under 10µs after the protocol stabilized.

SATSF deals with non-compliance much better than ASP. Fig.5.13 shows the maximum clock offset for 200 stations with one runs on 802.11 TSF. The maximum clock offset is under 18µs. This is a big improvement compared with the maximum clock offset over 150µs for ASP. The reason behind the improvement is that SATSF’s clock frequency adjustment is bounded.

Fig.5.14 shows the maximum clock offset for SATSF when n = 600. It shows that

SATSF can scale very well. The maximum clock offset is under 12µs even when the number of stations reaches 600.

82 10 SATSF n= 200

9

8

7

6

5 max clock offset(us) 4

3

2

1 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 Number of BP

Figure 5.12: Maximum clock offset for SATSF

18 SATSF with one non-compliance station n= 200

16

14

12

10

8 max clock offset(us) 6

4

2

0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 Number of BP

Figure 5.13: Maximum clock offset for SATSF with one non-compliance station

83 12 SATSF n= 600

10

8

6 max clock offset(us) 4

2

0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 Number of BP

Figure 5.14: Maximum clock offset for SATSF

n SATSF max offset ASP max offset 100 12 µs 59 µs 200 10 µs 60 µs 300 11 µs 64 µs 400 10 µs 63 µs 500 11 µs NC 600 11 µs NC

Table 5.4: Maximum clock offsets of SATSF and ASP

84 x SATSF avg max off 802.11 avg max off ASP avg max off 1 7 µs 0 µs 31 µs 2 15 µs 20 µs 34 µs 3 16 µs 21 µs 37 µs 4 24 µs 22 µs 37 µs 5 24 µs 23 µs 42 µs 6 26 µs 24 µs 43 µs 7 26 µs 25 µs 47 µs 8 27 µs 25 µs 47 µs 9 28 µs 26 µs 50 µs 10 29 µs 24 µs 50 µs 20 33 µs 32 µs 63 µs 30 38 µs 38 µs 75 µs 40 45 µs 49 µs 87 µs

Table 5.5: Average maximum clock offset of SATSF and ASP in mixed mode

Table 5.4 shows the maximum clock offset comparison between SATSF and ASP for the number of stations (n) ranging from 100 to 600. For SATSF, The maximum clock offset is well under the industry expectation (25µs). We can see it scales very

well. The maximum clock offset does not go up with the number of stations. The

performance of SATSF is good whether the IBSS has 100 stations or 600 stations.

ASP can control the maximum clock offset around 60 µs if n ≤ 400. The maximum

clock offset for ASP when n ≤ 400 is about 300% higher than SATSF. We cannot get

a stable maximum clock offset within the simulation periods if n ≥ 500. The clock

offset keeps increasing. We observed that the time for ASP to converge to a stable

state increased quickly with the number of stations. If n ≥ 500, repetitive collision

makes it impossible for a station to find the number of neighbors and which station

has slower timer. In that case, each station will compete every beacon period. ASP

cannot scale above 400 stations.

85 To further study the compatibility of SATSF, we ran the simulation using SATSF

in mixed mode. The total number of stations is 200, where x station(s) out of the

200 are running the 802.11 TSF. We compare the performance against a scenario that

there are only x stations and they are running 802.11 TSF. We compare the average maximum clock offsets for the two cases. For each beacon period, the clock difference between the stations with largest timer value and smallest value is stored as a sample.

The maximum clock offset is the maximum value among all the samples during the simulation period. The average maximum clock offset is the average among all the samples. We ran the simulation with the same setup for ASP.

Table 5.5 shows the average maximum clock offset for an IBSS running SATSF in mixed mode with x 802.11 TSF stations and 200 − x SATSF stations versus the scenario that there are x stations running 802.11 TSF and the case that x stations running 802.11 TSF and 200 − x stations running ASP. We can see the SATSF’s performance is very close to the 802.11 TSF performance except x = 1. If there is

only one station running 802.11 TSF, the clock offset is always 0. This result shows

that most of the clock offsets is contributed by the stations running 802.11 TSF.

This comparison study is set up very favorably to the 802.11 TSF since the total

number of stations is x, which is much smaller than 200 stations. If there are 200

stations running 802.11 TSF, the average maximum clock offset is over 1000µs. So the

performance of SATSF in mixed mode always performs better than the pure 802.11

TSF. SATSF handles compatibility very well.

For ASP, the average maximum offset is about 100% higher than that of SATSF.

The reason for the poor performance is that the protocol over-adjusted frequencies in

these situations and the offset becomes very large in a mix mode IBSS.

86 5.7 Summary

In this chapter, we review the current clock synchronization protocols in ad hoc networks. We then present several protocols that we have designed to solve the TSF scalability problem in a single-hop 802.11 IBSS.

802.11 TSF is not scalable. The maximum clock offset can be higher than 4000 µs for the 802.11 TSF. ATSP is the first effort to resolve the problem by giving priority to the fastest station. It scales very well compared with 802.11 TSF. ATSP can reduce the maximum clock offset to around 500 µs. But the protocol is slow to stabilize. It could be out of synchronization before the protocol stabilizes and it is also slow to re-stabilize after the fastest station leaves the IBSS. Station mobility handling is a drawback for ATSP.

TATSF is compatible with the 802.11 TSF and can control the maximum clock offset under 125µs. ABTSF is designed from the scratch and it can achieve even better synchronization (the maximum clock offset is under 50µs).

In our last protocol for a single-hop IBSS, we propose a protocol called SATSF.

It addresses both the scalability issues and the compatibility issue of 802.11 clock synchronization protocols. Compatibility is important due to the large installation base of 802.11 networks. This is an area where the research community has not investigated much yet.

SATSF that can achieve higher accuracy of clock synchronization than previous solutions. It can control the maximum clock offset under 20µs, and is completely com- patible with the 802.11 TSF without any change to the beacon format. We have also proved that he frequency adjustment by SATSF is bounded. This property ensures

87 good synchronization accuracy of SATSF in a mix-mode IBSS. SATSF outperforms

ASP by 100% in a mixed-mode environment.

In summary, SATSF not only has improved the clock synchronization accuracy to meet the 25µs industry expectation, but also has resolved the compatibility issue. It enjoys many desirable properties: scalable, compatible, accurate, simple and mobility- friendly.

88 CHAPTER 6

CLOCK SYNCHRONIZATION IN 802.11-BASED MULTIHOP AD HOC NETWORKS

The protocols we proposed for single-hop IBSSs can achieve very accurate clock

synchronization precision. However these solutions cannot be adopted directly into

the MANET. Simply giving priority to the fastest station(s) will not be enough. It

may take very long time for the timing information of the fastest station to reach the

stations many hops away. The accuracy of these types of TSFs will suffer in multihop

networks. Recently a few clock synchronization protocols for MANETs have been

proposed[37, 39]. But the maximum clock offset is over 200 µs after the protocol stabilization. There is still a lot of room for improvement.

6.1 Overview of Current Clock Synchronization Protocols in 802.11-based Multhop Ad Hoc Networks

A protocol called ASP is proposed in [37] for time synchronization in 802.11-based multihop ad hoc networks. The basic idea of the protocol is to let the faster clocks send out beacon more often and adjust clocks’ frequencies. But it did not address the scalability problem fully. The maximum clock offset is still over 200µs. The reason is that ASP trusts the face value of the timestamp of the beacon from the sending station. The result is that the slower station may over-adjust its clock frequency and

89 becomes faster than the original fastest station. This process may keep repeating, the frequencies of the stations are getting faster and faster unnecessarily (i.e. the frequency adjustment is un-bounded).

Another protocol called MTSF is proposed in [39] for 802.11 MANETs. The basic idea is to create a spanning tree rooted at the fastest station. Each station selects its

“parent” as the fastest neighbor. Once the tree is constructed, the station schedules its beacon transmission. It only competes in the beacon period that its parent is not competing. In other word, each station schedules beacon transmission every two beacon periods. The problem with the solution is that its beacon transmission schedule relies heavily on the spanning tree. When the fastest station moves to another location, the tree needs to be reconstructed and the schedule will be messed up in the process. Another issue with the protocol is that the maximum clock offset is still quite large (over 200 µs) after stabilization.

A non-hierarchical network synchronization scheme (mutual synchronization) was proposed in [34]. Even though it can achieve very good accuracy of clocks, however it is very expensive due to the complexity and can not be implemented easily under the 802.11 TSF framework. It violates our requirement for low cost solutions.

6.2 MATSF

In this section, we will propose a multihop adaptive timing synchronization func- tion called MATSF. The 802.11 TSF defined in a single-hop IBSS is not scalable in a MANET due to all the reasons as analyzed in the previous chapter. In addition, the timing information needs to travel multiple hops before reaching the destination.

90 It adds difficulty to achieve good clock synchronization accuracy. We will show how

MATSF resolves these issues.

6.2.1 Overview of our Protocol

Given the reasons of asynchronism (as discussed in Section 4.3), three strategies

suggest themselves as natural approaches to improving the 802.11 TSF’s scalability.

The first strategy is to reduce the number of stations competing for beacon generation.

The second strategy is to adjust clock frequencies so that all clocks in the MANET

have about the same accuracy (as apposed to the 802.11 allowed inaccuracy of as

much as ±0.01%). The third strategy is to establish a path for each station to reach

the fastest station(s) quickly through beacon exchange. This can be achieved through

the construction of a dominating set.

While the three strategies are conceptually simple and straightforward, it is non-

trivial to carry them out in a fashion that meets all the requirements specified in

Section 3.3. The current solutions are either too expensive or not accurate enough.

Beacon transmission prioritization

To implement strategy 1, we want to classify the stations into different tiers ac-

cording to their frequencies. It is hard and unnecessary to obtain a precise ranking;

an estimate is sufficient for our purpose. Each station divides the time line into ob-

servation periods - each period consisting of OBS BPs, where OBS is a pre-specified

integer. In each observation period, each station i computes the number of different stations - from which i has received at least one faster beacon. We declare a bea- con faster only if the timestamp minus the maximum estimation error (5 µs) is still

91 larger than the current TSF timer value. We record this number into ahead(i). If

ahead(i) < T HD, then station i competes every beacon period; otherwise, it com-

petes every Imax BPs.

Bounded frequency adjustment

For each station i, we will calculate a frequency adjustment fa(i), such that fn(i)+

fa(i) ≈ fn(fastest station). The basic idea behind the calculation of frequency

adjustment is as follows. Suppose station i receives two beacons from station j, say,

at times t1 and t2, respectively. From the timestamps on the beacons, station j’s

1 TSF timer values as of time t1 and t2 can be estimated — let them be TS (j) and

TS2(j), respectively. If it can be ensured that j’s timer had never been synchronized

between the times it sent the two beacons. Then from the values TS1(j) and TS2(j), station j’s clock frequency can be estimated. If this estimated frequency is higher than station i’s own clock frequency, then i’ adjusts its frequency to match j’s. This way, all stations can eventually have their adjusted frequency matching the fastest station’s clock frequency.

There are two design issues in the above frequency adjustment mechanism. First, how to ensure that j’s clock had not been synchronized between the times it sent the two beacons? It can be resolved by attaching a sequence number field at the end of the beacon frame. The sequence number is incremented each time a station is synchronized by another station. If the sequence numbers are the same, then the station is not synchronized by other stations. This is a classic solution. The second issue is that when station i adjusts its clock frequency to match j’s, it is important to ensure that i does not overdo it. That is, i’s adjusted frequency must not be higher

92 than j’s frequency. If stations over-adjust their frequencies, then their (adjusted) frequencies may get higher and higher and eventually run out of the 802.11-allowed range of 1 + ± 0.01% mega hertz (MHz). When this happens, the performance of the time synchronization function will degrade.

We overcome this problem by taking into consideration the inaccuracy of times- tamps on beacons. According to the 802.11 specifications, the timing information carried by the timestamp may be inaccurate by as much as ±5µs. Thus, denoting

1 2 by T (j) and T (j) station j’s actual timer values as of times t1 and t2, respectively,

where t1 and t2, as before, are the times when j’s two consecutive beacons arrive at a

station, we have |T 1(j) − TS1(j)| ≤ 5 µs and |T 2(j) − TS2(j)| ≤ 5 µs. To avoid over-

adjusting a station’s frequency, we will estimate station j’s frequency conservatively

by

(TS2(j) − δ) − (TS1(j) + δ)

t2 − t1 T 2(j) − T 1(j) ≤ = adj freq(j) (6.1) t2 − t1

where δ = 5µs. By adjusting i’s clock frequency to this conservatively estimated

frequency of j, we guarantee the i will never over-adjust its frequency.

Construction of dominating set

To implement strategy 3, we try to construct a dominating set for the stations in

the MANET. The dominating set problem is to find a subset of nodes (dominating

set) in a graph such that each node is either in the dominating set or adjacent to a

node in the dominating set. We put the fastest station(s) into the dominating set,

we also put gateway stations and selected bridge stations (to be defined later) into

93 the dominating set and let them compete for beacon transmission every BP; while

the rest of the station compete only once in a while. The timing information of the

fastest node will be propagated through the MANET very quickly among the path

of dominating nodes. The collision is reduced due to the fact that none dominating

set stations compete for beacon transmission less frequently.

Represent the MANET as an undirected graph, G = (V,E). Let DS be any subset of V . Relative to this set, a node u in V is defined to be inDS, covered (by

DS), uncovered (by DS), a bridge, or a gateway as follows:

• inDS: if u ∈ DS;

• uncovered: if u∈ / DS and there is no edge joining u to any node in DS;

• covered: if u∈ / DS and there is an edge (u, v) ∈ E for some v ∈ DS;

• bridge: if u is covered and has at least one uncovered neighbor;

• gateway: a covered node u is a gateway node if there are two connected com-

ponents in G(DS), say, C1 and C2, such that hop(u, C1) + hop(u, C2) ≤ 3,

where G(DS) denotes the subgraph induced by DS, and hop(u, C1) denotes the

(minimum) number of hops between u and C1.

For instance, in Fig. 6.1, a is a covered node; b, c, d are uncovered; x is a bridge; v and w are gateways, u is both a bridge and a gateway. (Note that as a gateway or bridge, u, v, w, and x are also covered nodes. Here we emphasize their gateway/bridge roles).

We try to construct a dominating set starting with one node in the DS (for example, the initiator of the MANET), and adding bridge/gateway nodes into the

DS. The following lemmas will guide our protocol design.

94 b c

a x d

DS1 u DS2

v w

Figure 6.1: Covered, bridge and uncovered nodes

Lemma 5 DS becomes a dominating set whenever there is no bridge in G.

Proof. It follows directly from the definition of dominating set.

Lemma 6 A dominating set in G is connected iff there is no gateway in G.

Proof.(⇒) If DS is connected, G(DS) has only one connected component and,

therefore, no node can be a gateway.

(⇐) Now suppose DS is a disconnected dominating set. By definition, There are no uncovered nodes in G. Let S1 and S2 be two “nearest” connected components of

DS; i.e., the hop number between S1 and S2 is smallest among all pairs of connected

components. The hop number between S1 and S2 is either two or three. (For if the

hop number is less than two, S1 and S2 would be connected; if it is more than three,

there would be uncovered nodes.) The one or two nodes on the shortest path between

S1 and S2 are gateways.

95 We add to the beacon frame a 3-bit field, called status, for the sender to indicate

its present staus.

Each station, i, continuously observes the beacons received in the past OBS beacon

periods. #inDS bcn(i) and #uncovered bcn(i) are the number of inDS beacons and

the number of uncovered beacons, respectively, received by i in the past OBS beacon

periods. At the end of each beacon interval, If status(i) is not inDS/gateway, it

updates its status as follows:  uncovered if (#inDS bcn(i) = 0)    covered if (#inDS bcn(i) > 0) and  status(i) := (#uncovered bcn(i) = 0) (6.2)   bridge if (#inDS bcn(i) > 0) and   (#uncovered bcn(i) > 0) To help speed up the process of recognizing bridges, an uncovered node compete for beacon transmission every interval.

In order to keep the size of the dominating set small, bridges and gateways should not be indiscriminately added to DS. For instance, in Fig. 6.2, assuming that the bridges and the uncovered node x are all within each other’s transmission range, it is sufficient to let one of the bridges enter DS.

To avoid adding too many bridge nodes into the DS, the following equation is used to calculate when a bridge station enters DS (after bridge T BPs). bridge T is

recalculated whenever the number of uncovered neighbors changes.

T bridge T = max (6.3) number of uncovered neighbors Gateways are considerably harder to recognize. For example, consider the situ- ation as illustarted in Fig. 6.3, where suppose DS1 and DS2 are two disjoint sets of

inDS nodes, node u is not inDS, and node v may or may not be inDS. By definition,

96 x

b

DS Bridges

Figure 6.2: One bridge is enough to enter DS

u

DS1 DS2 v

Figure 6.3: It is difficult to recognize gateways.

97 u is a gateway iff v is not inDS. A challenging question is, without knowing v’s status,

can u determine its own status? We develop a heuristic for a gateway to recognize

its gateway status.

Recall that in our timing synchronization protocol , stations in DS generate bea-

cons far more frequently than those not in DS. Thus, in Fig. 6.3, if v is in DS, it is

supposed to transmit beacons frequently enough to synchronize DS1 with DS2. On

the other hand, if v is not in DS, it is possible that DS1 and DS2 be getting out of synchronization. We use this difference as a heuristic for u to determine whether it is a gateway. Thus, we adopts the following heuristic.

A covered station regards itself as a gateway if it receives a beacon with a timing

“considerably” earlier than the station’s own timer. (A practical definition of “consid- erably earlier” which we used in our simulation is, timing t1 is said to be considerably earlier than t2 if t1 < t2 − 80%∆, where ∆ is the maximum time difference between clocks that one wishes to achieve. ∆ = 50µs in our simulation.) Our heuristic may not recognize every gateway node. For example, if we have a graph with 3 nodes in a line. The middle node has the slowest frequency. The node to the left and the node to the right have the same fast frequencies. We will not be able to detect the middle node as the gateway. However, it will not impact the accuracy of our timing synchronization protocol. We fail to detect some gateway nodes only if their clocks are already synchronized very accurately.

6.2.2 A Scalable Solution for Clock Synchronization: MATSF

Now we are ready to introduce a new scheme by integrating the three strategies to meet all the requirements of clock synchronization for an 802.11 MANET.

98 We define the terms and variables related to the new protocol MATSF first, then

MATSF itself.

• T (i): TSF timer value of station i.

• NT (i): native timer value of station i based on the oscillator.

• SK(i): clock frequency adjustment for station i. The amount SK(i) ∗ 106 is an

estimate of fa(i), and will be added to T (i) per second.

• TS(j): the adjusted timestamp value obtained from the beacon sent by j and

received by i. It is the sum of the timestamp value in the beacon plus the

receiving PHY layer delay and the time since the first bit is received at the

receiver’s PHY/MAC interface.

• seq(j): the sequence number obtained from the beacon sent by j and received

by i.

• ahead(i): number of stations sending out faster beacon(s) during an observation

period.

• ±δ: the maximum error that may occur when we estimate the value of T (j) by

TS(j). That is, |T (j) − TS(j)| ≤ δ µs when j’s beacon arrives at the receiving

station’s MAC layer.

• ∆NT (i)(j): the amount of time (i’s native time) since the last time station i

received a beacon from station j with a faster timestamp.

• last NT (i)(j): the native timer value of station i the last time it received a

beacon from station j with a faster timestamp.

99 • last sync T (i)(j): the timer value of station i the last time it was synchronized

by a faster beacon from station j.

• last seq(i)(j): the sequence number station of j the last time when station i

received a beacon from station j with a faster timestamp.

• BC(i): number of beacon periods between two beacon contentions.

• C(i): counter of beacon periods.

• status(i): 3-bit addition to the beacon representing the dominating set status.

The values can be inDS, covered, uncovered, a bridge, or a gateway.

• bridge T (i): number of BPs for a bridge node to wait before entering DS.

Now we are ready to present MATSF.

MATSF: Multihop Adaptive Timing Synchronization Function

1. Initially, when station i joins the MANET,

if station i is the initiator of the MANET, let

NT (i) ← T (i) ← 0, status(i) ← inDS, BC(i) ← 1

else if i joins in by hearing a beacon from station j,

NT (i) ← T (i) ← TS(j) − δ,

if status(j) = inDS, then

status(i) ← covered, BC(i) ← Imax

else status(i) ← uncovered, BC(i) ← 1.

In both cases, let SK(i) ← 0, C(i) ← rand(1,BC(i)),

and start an observation period of OBS.

100 2. If C(i) < BC(i), station i will not compete for beacon

transmission.

3. If C(i) ≥ BC(i), C(i) ← 0, station i is ready to compete.

4. At each TBTT each station that wants to compete

for beacon transmission calculates a random delay

uniformly distributed in the range [0, w].

5. The station waits for the period of the random delay.

6. When the random delay timer expires, if the medium

is idle, the station transmits a beacon with a

timestamp; else if it receives a beacon before its

random delay timer expiration, it cancels the pending

transmission and the remaining random delay.

7. Upon receiving a beacon from station j, a station i

performs:

if status(j) = inDS and status(i) = uncovered

status(i) = covered.

if status(j) = uncovered and status(i) = covered

status(i) = bridge, calculate bridge T (i).

if status(i) = covered and T (i) > T (j) + δ + 0.8∆

status(i) = gateway.

if T (i) ≤ TS(j) − δ then

seq(i) ← seq(i) + 1

T (i) ← TS(j) − δ

∆NT (i)(j) ← NT (i) − last NT (i)(j)

101 tmp ← TS(j) − last sync T (i)(j) − ∆NT (i)(j) − 3δ

if seq(j) = last seq(i)(j) and tmp ≥ 0

SK(i) ← max{SK(i), tmp/∆NT (i)(j)}

last NT (i)(j) ← NT (i)

last sync T (i)(j) ← TS(j) − δ

last seq(i)(j) ← seq(j)

8. If SK(i) > 0, station i increments T (i) by 1 every

d1/SK(i)e µs (in terms of station i’s native time).

9. At the end of a beacon period, C(i) ← C(i) + 1,

if bridge T (i) > 0, bridge T (i) ← bridge T (i) − 1.

update status(i) using Eq. 6.2.

if status(i) = bridge & bridge T (i) = 0, status(i) ← inDS.

if status(i) = gateway, status(i) ← inDS.

if status(i) = inDS or status(i) = uncovered, BC(i) ← 1;

else BC(i) ← Imax, C(i) ← rand(1,BC(i)).

10. At the end of observation period, if ahead(i) < T HD,

then status(i) ← inDS.

Reset ahead(i), #inDS bcn(i), #uncovered bcn(i).

11. NT (i) increments by 1 whenever station i’s

oscillator ticks.

In this algorithm, we update three variables under the proper conditions to meet

our design requirements. We change the TSF timer value of the receiving station i

(T (i)) when we are sure the clock time difference is out of the margin of error. We

102 modify the BC value to control how often a station competes for beacon transmis-

sion. We reset frequency adjustment (SK) only when we are sure the sender’s clock

frequency is faster.

When station i receives a beacon from station j, it first checks whether TS(j)−δ ≥

T (i). If that is true, i knows that station j’s clock value is larger than its own

timer and i will adjust its TSF timer value. To make sure that j’s clock is not

reset between these 2 beacons, the protocol further checks whether the sequence

number is the same between the sequence number in the beacon from j and the

sequence number recorded when station i receives a faster beacon from j last time.

If TS(j) − last sync T (i)(j) − ∆NT (i)(j) ≥ 3δ, we are sure station j advances faster than station i’s native clock (we will prove it in theorem 2), then SK(i) is

re-calculated. By adding 1 tick every d1/SK(i)e native time ticks, the frequency of

station i is in fact adjusted like a physical frequency change on the clock oscillator.

Since it is done through the protocol, no additional hardware is needed. If SK(i) is

reset after receiving a beacon from station j, we will say that station i’s frequency is

synchronized by station j.

BC(i) is used to decide how often a station competes for beacon transmission. A

station competes for beacon transmission every BC BPs. BC(i) is 1 for inDS and

uncovered stations; BC(i) is set to Imax for other stations.

6.2.3 Analysis of the protocol

We would like to prove that our frequency adjustment is bounded. This is very

important for the theoretical foundation of the good accuracy and the long-term

stability of the protocol. We would also analyze how quick the station can recognize

103 its status and this analysis will tell us how fast we can construct the dominating set

and give us guidance on the selection of parameters used in MATSF.

Bounded frequency adjustment

Suppose that station i synchronizes its timer, T (i), on receiving another station

j’s beacon. We show in the following lemma that at the moment right after the

synchronization (i.e., when T (i) is updated to TS(j) − δ in step 7 of the algorithm),

the values of the two stations’ timers are related by T (i) ≤ T (j) ≤ T (i) + 2δ.

Lemma 7 If station i synchronizes its clock with station j, then at the moment right

after the synchronization, it holds that T (i) ≤ T (j) ≤ T (i) + 2δ.

The proof is the same as the single-hop SATSF.

The following theorem shows that the adjusted frequency of each station is bounded

by the frequency of the station with the highest native frequency.

Theorem 2 For all stations i in the MANET, adj freq(i) is non-decreasing as a function of time. Furthermore, adj freq(i) ≤ fn(s0) for all i, where s0 is the station

with the highest native frequency that has ever joined the MANET. (Note that s0 may

still be in the MANET or may have left).

Proof. Since SK(i) := max{SK(i), ...}, SK(i) is obviously non-decreasing as a func-

tion of time. It then follows from Lemma 4 that adj freq(i) is also non-decreasing.

To establish the bound adj freq(k) ≤ fn(s0) for all k during the life-span of the

MANET, it suffices to show the following: (1) the bound holds at the MANET’s incep-

tion, which is obviously true, and (2) if the bound holds up to the time when a station

is about to update its SK, then after the update the bound is still valid. To prove the

104 latter statement, consider the event that station i adjusts SK(i) upon receiving a bea-

con from station j. As the induction hypothesis, assume adj freq(k) ≤ fn(s0) for all k

(in particular, adj freq(j) ≤ fn(s0)) before the SK(i) update. Since adj freq(j) does not change during the event, it is sufficient for us to show adj freq(i) ≤ adj freq(j)

after the SK(i) update.

According to the protocol, station i may adjust its SK only if i’s timer has been

synchronized twice by station j with the same sequence number and

TS(j) − last sync T (i)(j) − ∆NT (i)(j) ≥ 3δ (6.4)

Let t1 be the time (of a reference clock) of the last timing synchronization and t2 be

that of this timing synchronization. Let T 1(j) and T 2(j) be the values of T (j)(j’s

TSF timer) as of t1 and t2, respectively. TS(j) in Eq.6.4 is the timestamp value at

2 t2. We denote it as TS (j). Let ∆t = t2 − t1.

During the period (t1, t2), station j’s clock has never been synchronized by other

stations. This is due to fact that j’s sequence number has not been changed. Thus,

over the period (t1, t2), timer T (j) has been ticking at its adjusted frequency, adj freq(j),

and has advanced from T 1(j) to T 2(j). Therefore, T 2(j) − T 1(j) adj freq(j) = . (6.5) ∆t By Lemma 7, T 1(j) ≤ last sync T (i)(j) + 2δ. By Eq. 5.6, T 2(j) ≥ TS2(j) − δ.

Substituting these into Eq. 6.5 yields TS2(j) − last sync T (i)(j) − 3δ adj freq(j) ≥ . (6.6) ∆t On the other hand, adj freq(i) can be computed as follows. Station i’s native clock

advances ∆NT (i)(j) between time t1 and t2. Therefore, ∆NT (i)(j) + ∆NT (i)(j)/(1/dSK(i)e) adj freq(i) = ∆t 105 ∆NT (i)(j) + ∆NT (i)(j) ∗ SK(i) ≤ (6.7) ∆t

By definition,

TS2(j) − last sync T (i)(j) − ∆NT (i)(j) − 3δ SK(i) = ∆NT (i)(j)

Substituting this into Eq. 6.7, we obtain

TS2(j) − last sync T (i)(j) − 3δ adj freq(i) ≤ (6.8) ∆t

Eqs.6.6 and 6.8 together imply adj freq(i) ≤ adj freq(j).

Probability of recognizing a bridge within OBS beacon periods

Consider a bridge B. We are interested in estimating the amount of time it would take for B to recognize its bridge status using our protocol.

Let M be the number of stations in the (1-hop) neighborhood of B — M1 of them are black and M2 are white — which are contending for beacon transmission in slot

0 window [0,W ]. Let E (m1, m2, w, s) denote the event that exactly s slots in [0, w − 2] are busy, that slot w − 1 is idle, and that m1 black and m2 white stations remain to contend for beacon transmission (i.e., the random numbers picked by these stations are all in the range [w − s, W ]). denote by p(m1, m2, w, s) the conditional probability

0 that given E (m1, m2, w, s) at least one of the m1 black stations successfully transmits a beacon.

Lemma 8 Given M stations in the (1-hop) neighborhood of B — M1 of them are black and M2 are white — the probability that at least one black station successfully sends a beacon within a window is p(M1,M2, 0, 0), which can be calculated recursively as in the proof below.

106 0 Proof. Given E (m1, m2, w, s), let E be the event that at least one of the m1 black

stations successfully transmits a beacon. Event E can be partitioned into four disjoint

sub-events — E1, E2, E3, E4 (as specified below) — and therefore,

p(m1, m2, w, s) = p1 + p2 + p3 + p4 (6.9)

where pi, as specified below, denotes the conditional probability of event Ei given

0 E (m1, m2, w, s).

• E1: There is no beacon transmission in slot w, but at least one successful black

beacon transmission in window [w + 1,W ]. This event occurs iff all the m stations,

where m = m1 +m2, picked a random number in [w −s+1,W ] and at least one of the

0 black stations succeeds. Thus, the probability of its occurence (given E (m1, m2, w, s))

is  W − w + s m p = p(m , m , w + 1, s) (6.10) 1 W − w + s + 1 1 2

• E2: There is a successful black beacon transmission in slot w. This event occurs

iff a unique black station chooses slot w − s. Therefore,

 1   W − w + s m−1 p = m (6.11) 2 1 W − w + s + 1 W − w + s + 1

• E3: There is a successful white beacon transmission in slot w and at least one successful black beacon transmission thereafter. It’s probability can be easily calculated as

 1   W − w + s m−1 p = m 3 2 W − w + s + 1 W − w + s + 1

p(m1, m2 − 1, w + b + 1, s + b) (6.12)

107 p(m1,m2,0,0) 0.8 0.7 0.6 p(m1,m2,w,s) 0.5 0.4 0.3 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1

14 12 10 2 8 4 6 6 m2 8 10 4 12 2 m1 14

Figure 6.4: Probability that success black beacons ≥ 1

• E4: There are unsuccessful (collided) beacon transmissions in slot w, but at

least one successful black beacon transmission in window [w + b + 1,W ].

m  i  m−i X m 1 W − w + s p4 = Ci i=2 W − w + s + 1 W − w + s + 1

min(m1,m−i) m1 m2 X Cx Cm−i−x m p(x, m − i − x, w + b + 1, s + 1) x=0 Cm−i

The boundary condition is p(m1, m2, w, s) = 0 if m1 = 0, m2 < 0, w > W , or

s > W .

Using the formulas developed in the proof of Lemma 8, we can calculate p1 (resp. p2), the probability that at least one inDS (resp. uncovered) node successfully trans- mits a beacon in a beacon interval.

108 Theorem 3 Let N = OBS, the length of an observation period. With probability

N N N N p = 1 − q1 − q2 + q1 q2 a bridge can recognize its bridge status in a single

observation period, where q1 = 1 − p1 (resp. q2 = 1 − p2) is the probability of B not even hearing an inDS (resp. uncovered) beacon in a beacon generation window.

Proof. Let X (resp. Y ) be the number of beacon generation windows until the

first successful inDS (resp. uncovered) beacon transmission. Both X and Y are

x−1 geometrically distributed with marginal probability functions fX (x) = p1q1 and

y−1 fY (y) = p2q2 , where q1 = 1 − p1 and q2 = 1 − p2. Let N = OBS be the length of an observation period. The probability that a bridge recognizes its status in a single observation period is

N N N N p = P (max(X,Y ) ≤ N) = 1 − q1 − q2 + q1 q2

This theorem is useful for determining the length of an observation period and

number of fastest inDS nodes. In our performance studies (to be presented in Sec-

tion 5.6), we choose N = OBS = 10. p1 and q1 can be found using Fig. 6.4. Let

assume there are 32 covered nodes and Imax = 16 (The effect is similar to adding 2

inDS or uncovered nodes).

With this value of OBS, the probability of recognizing a bridge in an observation

period is 0.85 if there is only one inDS node and 13 uncovered nodes. The probability

is 0.98 or higher when there are 2 or more inDS nodes and 12 uncovered nodes. In

our simulations, the average number of beacon periods needed to recognize a bridge

is 10.2, which is equal to 1.2 seconds in most implementations of IEEE 802.11.

109 700 802.11 TSF n= 500

600

500

400

300 max clock offset(us)

200

100

0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 Number of BP

Figure 6.5: Maximum clock offset for 802.11 TSF

If THD = 2, then the number of inDS nodes is at least 2, combined with OBS = 10, we can achieve very high probability to recognize a bridge in an observation period.

The probability to recognize a gateway is very hard to analyze. But we observed through simulation that the protocol reaches a stable state when all the uncovered nodes are covered by inDS nodes. Therefore, it is not very critical to have an accurate analysis for gateway recognition.

6.3 Performance studies

In the simulation, we let the clock frequency uniformly distributed in the range of [−d, d]. We pick d = 0.01%. It is the worst clock accuracy allowed by the 802.11 standard. The number of slots needed to send a beacon is called beacon length. We run the simulation for OFDM system with bit-rate of 54 Mbps: W = 30 and beacon length b = 4. The MANET has n stations. We set the packet error rate to be 0.01%.

110 600 ASP n= 500

500

400

300 max clock offset(us) 200

100

0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 Number of BP

Figure 6.6: Maximum clock offset for ASP

We run the simulation for 5000 BPs (500 seconds). We randomly distribute these n stations in a 1000m × 1000m region. Each station has a transmission range of 250 meters. The mobility model we adopt is the random way-point model proposed in

[8]. Each station starts the simulation by being stationary for pause time seconds.

After that, it selects a random destination within the simulation region and moves to the destination at a speed distributed randomly between 0 and a maximum moving speed. After it reaches the destination, it pauses again for pause time seconds and picks a new target and repeats the process. We set the maximum speed as 5 m/s and the pause time 50 seconds. We show the maximum clock offset starting from beacon period 100 to ignore the initial clock offset.

802.11 TSF is not scalable for MANETs. When n = 500, the maximum offset can be over 700µs and the average over 200µs as shown in Fig. 6.5.

111 200 MATSF n= 500

150

100 max clock offset(us)

50

0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 Number of BP

Figure 6.7: Maximum clock offset for MATSF

We ran the simulation with α = 3 as it is the preferred value by [37]. Fig. 6.6 shows the maximum clock offset during each beacon period for ASP when n = 500. It

shows good improvement over the 802.11 TSF but it still has large clock offset (over

300µs). It does not address the scalability issue completely.

We ran the simulation for our new protocol MATSF with δ = 5, Imax = 16,

∆ = 50, Tmax = 32, OBS = 10 and THD = 2.

Fig.6.7 shows the maximum clock offset for an IBSS with 500 stations. We can see

from Fig.6.7 that MATSF can synchronize the clocks very precisely. The maximum

clock offset is under 50µs.

MATSF can reduce the maximum clock offset to under 50µs very quickly (under

10 seconds). ASP takes 500% more time to stabilize. We say the TSF converges when

the maximum clock offset will stay in a close range and stop going up significantly

112 n MATSF ASP 802.11 100 24 µs 270 µs 277 300 24 µs 220 µs 254 500 43 µs 313 µs 708

Table 6.1: Maximum clock offset of MATSF, ASP and 802.11 TSF

(say 30 µs). Because of the construction of dominating set, the timing information can be propagated to all the stations very quickly for MATSF.

MATSF also shows nice stability after the protocol converges. The maximum offset keeps going down along the time. Fig.6.7 shows the trend clearly. The reason behind the improvement is that MATSF’s clock frequency adjustment is bounded and each frequency adjustment will bring the frequency differences smaller. In other word, the frequency of any station is inching toward the frequency of the fastest station with each adjustment.

Table 6.1 shows the maximum clock offset comparison between MATSF, ASP and

802.11 TSF for the number of stations (n) ranging from 100 to 500. For MATSF, The

maximum clock offset is under 50µs. The maximum clock offset for ASP is about

700% higher than MATSF.

Table 6.2 shows the average maximum clock offset comparison between MATSF,

ASP and 802.11 TSF. For ASP, the average maximum offset is about 400% higher

than that of MATSF. The reason for the poor performance is that the protocol over-

adjusted frequencies in these situations and the fastest stations may not form a dom-

inating set. It may take long time for the timing information from the fastest station

to reach the slow stations.

113 n MATSF ASP 802.11 100 12 µs 59 µs 127 µs 300 12 µs 62 µs 138 µs 500 16 µs 109 µs 212 µs

Table 6.2: Average maximum clock offset of MATSF, ASP and 802.11 TSF

6.4 Summary

In this chapter, we study the scalability problem of clock synchronization proto-

cols for 802.11 ad hoc networks in a mult-hop environment. The current solutions to

the scalability problem are still short of the expectation: the maximum clock offset is

over 200µs. We propose an adaptive protocol called MATSF that can achieve higher accuracy of clock synchronization than any of the current solutions. It can control the maximum clock offset under 50µs. This is an improvement over 400%. We analyze

why the current solutions cannot achieve the desired accuracy. We prove our fre-

quency adjustment is bounded and non-decreasing. This provides a solid foundation

for good long-term protocol stability. Our protocol also converges several times faster

than other solutions due to the use of dominating set.

114 CHAPTER 7

A TIMER-BASED PROTOCOL FOR CONNECTED DOMINATING SET CONSTRUCTION IN IEEE 802.11 MULTIHOP MOBILE AD HOC NETWORKS

IEEE 802.11 wireless LAN [1] has gaining wide acceptance among mobile profes- sionals. Its ad hoc mode allows a set of mobile stations to form a temporary network without any infrastructure support, making it a perfect candidate to construct mul- tihop ad hoc networks (MANETs). In such a network, connected dominating set

(CDS) is commonly used as the virtual backbone of the network [9]. A dominating set is a subset of nodes in a graph such that each node not in the subset has at least one direct neighbor that belongs to the subset. If the nodes in the dominating set form a connected graph, the set is a connected dominating set. It has been found extremely useful in routing [13] [47] [48] [46], broadcast [11] [41] [10][40], topology management[5], and collision avoidance [45]. How to construct a CDS by efficient message communication is the main problem we try to address in this chapter[54].

7.1 Current CDS solutions

Constructing minimum CDS for an arbitrary graph is known to be NP-hard [15]

[18]. The problem becomes more challenging when the knowledge of complete network topology is not available prior to computation, which is a practical assumption in

115 mobile ad hoc networks. Hence, the distributed CDS construction protocols proposed in the past have settled with constructing a “smaller” connected dominating set for ad hoc networks based on local information available at each station. Among them, the most noticeable ones are [44] [48].

The CDS construction protocol proposed in [48] obtains the CDS by eliminating unnecessary nodes from the network. It is basically a two-phase approach. In the first phase, a node exchanges the neighbor list with its neighbors. If a node finds that all its neighbors are connected each other, it removes itself from the consideration of the

CDS. In the second phase, some heuristic rules are applied to further reduce the size of the set. The protocol is simple, distributed, and most of time computes a CDS with a very competitive size. However, it introduces extra messages between immediate neighbors (to exchange neighbor list). Additionally, when topology changes, the protocol does not have a mechanic to maintain the CDS.

The protocol in [44] constructs the CDS by expending the maximal independent set. It also has two phases. In the first phase, if a node finds its unique MAC ad- dress is minimum among its neighbors, it adds itself into a set and removes itself and all its neighbors from the consideration of the set members. This process is re- peated until the resulting set becomes the maximal independent set, which is also a (non-connected) dominating set. In the second phase, the nodes in the set uses local topology information up to 3 hops to add gateway nodes to the set until the set becomes a CDS. One key advantage of this protocol is that the size of the resulting

CDS is bounded by a constant times the size of the minimum CDS. In the simula- tions, the CDS generated by this protocol is smaller than the CDS obtained by other distributed protocols proposed in the past, including [48]. However, this protocol

116 incurs even more extra messages than the protocols in [48]. Also, the protocol does not adapt to the changes of network topology.

7.2 Requirements for Connected Dominating Set in MANETS

Due to the nature of mobile ad hoc networks, any practical CDS construction protocol for ad hoc networks should be fully distributed. In addition, it should have the following properties:

• The resulting CDS should be small – The impact of the size of CDS is two folds.

First, when the network topology changes due to nodal movements, a smaller

CDS is easier to maintain. Second, the size of the CDS is closely related to

the size of the routing table at each node. The smaller the CDS is, the smaller

routing table each node has and therefore less overhead to maintain the routing

table.

• The protocol should adapt to topology changes – In mobile ad hoc networks,

each node can move at arbitrary direction. The network topology can change

from time to time. As a result, a CDS constructed earlier may no longer be valid

a few minutes later. To save the network resource, a good CDS construction

protocol should maintain a CDS without the need of reconstructing the whole

set from scratch every time the network topology is changed.

• The protocol should avoid introducing extra messages – Bandwidth is a precious

resource in wireless networks. Introducing any extra messages may degrade

the performance of the system significantly. If possible, the protocol should be

117 carefully designed so that the necessary local information can be collected solely

via beacons.

7.3 MAC-layer Timer-based Connected Dominating Set Con- struction Protocol

Like many other CDS protocols, our distributed MAC-layer Timer-based Con-

nected Dominating Set Construction protocol (MTCDS) also has two phases. The

first phase is to elect an initiator in the MANET; the second phase is to construct a

CDS from the initiator. The protocol is elaborated in the following subsections.

7.3.1 Notation Definitions

Before introducing the MTCDS protocol, we would like to introduce the following

notations and their definition. They will be used in the following discussion.

A mobile ad hoc network (MANET) is represented as an undirected graph G =

(V,E), where V is the set of all stations in the MANET and E is the edge set with

(u, v) ∈ E if and only if u and v are within each other’s transmission range. Station and node are used exchangeable throughout the paper.

If G is connected, a set DS ⊂ V is called a dominating set if for every vertex v ∈ V − DS, there exists a vertex w ∈ DS such that (v, w) ∈ E. A dominating set is said to be connected if its induced graph in G is connected.

A node u ∈ V is said to be in the state of inDS, covered (by DS), or uncovered

(by DS) according to the following:

• inDS: if u ∈ DS;

• covered: if u∈ / DS and there is an edge (u, v) ∈ E for some v ∈ DS;

118 • uncovered: if u∈ / DS and there is no edge joining u to any node in DS;

7.3.2 The MTCDS Protocol

The MTCDS protocol is based on a simple greedy strategy. That is, to obtain a smaller dominating set, a node with more uncovered neighbors should have better chance to be included in the dominating set than a node with fewer uncovered neigh- bors. The protocol basically works as follows. Starting from an initiator as the first node in the DS, the direct neighbors are marked as covered nodes. For each covered node, a timer is set based on the number of uncovered neighbors. Nodes with more uncovered neighbors are given a smaller timer value, hence will expire earlier. When the timer expires, a node enters the DS if it still has uncovered neighbors.

Initiator Election

According to IEEE 802.11 wireless LAN specification [1], a node periodically broadcasts the beacon. The timers used in this protocol have initial value -1. A positive integer is assigned when a timer is started. The timer value will go down each beacon period. When the value reaches 0, the timer expires and the value stops at 0.

Figure 7.1 is the pseudo code for the initiator election phase of the MTCDS protocol.

The initiator election is to select one unique initiator. We use node ID (for exam- ple, MAC address) as the metric to select the node with smallest ID as the initiator.

Other metrics can be used as long as they are unique. The initiator will send out

ANNOUNCE message every initMax beacon periods, it will refresh InitT imer of

119 /* node i in MANET executes the following: */ Initialization : initiator(i) ← MAXINIT status(i) ← uncovered color(i) ← 0 DSTimer(i) ← −1 ODSTimer(i) ← −1 InitT imer(i) ← initMax, start InitTimer

InitTimer expires if initiator(i) = MAXINIT then /* initial announcement */ initiator(i) ← i announce(i, i, color(i)) InitT imer(i) ← 2 ∗ initMax, start InitTimer else if initiator(i) = i then /* initiator is selected */ color(i) ← color(i) + 1 announce(initiator(i), i, color(i)) InitT imer(i) ← initMax, start InitTimer /* refresh message*/ else if initiator(i) 6= i then /* re-elect initiator */ status(i) ← uncovered initiator(i) ← MAXINIT color(i) ← 0 wait for 2 ∗ initMax initiator(i) ← i announce(initiator(i), i, color(i)) InitT imer(i) ← 2 ∗ initMax, start InitTimer

Node i receiving announce(j, k, c) /* i 6= j */ if initiator(i) > j or initiator(i) = j and color(i) 6= c then initiator(i) ← j color(i) ← c announce(j, i, c) InitT imer(i) ← 2 ∗ initMax, start InitTimer

Figure 7.1: Initiator Election Protocol

120 other stations which expires after 2 ∗ initMax beacon periods. It is a soft state pro-

tocol, the expiration of InitTimer for stations other than the initiator implies that

the initiator leaves the MANET. The nodes will wait 2 ∗ initMax to make sure all

the InitT imers expire, the initiator election process starts again.

Timer-based Connected Dominating Set Construction

After the initiator is detected, the initiator enters DS first. It broadcasts to its

neighbor about its inDS status. A neighboring uncovered node becomes covered after

receiving the message. Then the covered node calculates the ∆T according to the

following formula if it still has uncovered neighbors and start its DSTimer.

1 ∆T = T · (7.1) max (number of uncovered neighbors)α

It is clearly that nodes with more uncovered neighbors result in shorter defer time compared with nodes with fewer uncovered neighbors as long as α > 0 in Equation 7.1.

When the DSTimer expires, the node enters DS and broadcasts to its neighbor about its inDS status.

Figure 7.2 is the pseudo code for the second phase of the MTCDS protocol after the unique initiator is identified.

For inDS station, the broadDS message is sent every beacon period. Again we utilize soft state technique to maintain the status of covered nodes. If a covered node does not receive a broadDS message for δt beacon periods, it implies that the dominator(s) have left. The value of δt depends on the message error rate. For the

802.11 network, a small value such as 4 is good enough.

121 /* node i executes the following */ Node i detects itself as initiator : status(i) ← inDS color(i) ← color(i) + 1 broadDS(i, color(i))

Receiving broadDS(j,c) : if color(i) < c then color(i) ← c if status(i) = uncovered then status(i) ← covered start CoveredTimer with δt

Node i in covered state : if (i hears from a neighbor of large color difference) status(i) ← inDS broadDS(i, color(i))

if ( i does not have any uncovered neighbor ) DSTimer(i) = -1 else if ODSTimer(i) = −1 then DSTimer(i) ← ∆T , start DSTimer ODSTimer(i) ← ∆T else if ODSTimer < ∆T then DSTimer(i) ← ∆T , start DSTimer ODSTimer(i) ← ∆T

Node i in inDS state : if ( i does not have any covered neighbor ) and (i has at least one inDS neighbor) then status(i) ← covered

DSTimer expires : status(i) ← inDS broadDS(i, color(i))

CoveredTimer expires : status(i) ← uncovered

Figure 7.2: Timer-based Connected Dominating Set Construction Protocol

122 7.3.3 Beacon Frame Extension

Notice that there is no need for any new control messages for the MTCDS protocol.

All the messages mentioned in the pseudo code are in fact beacon frames with slight

extension. The extended beacon frame format for 802.11a is shown in Figure 7.3.

The same extension for 802.11b and 802.11g can be easily made. The only difference

is the length of base beacon frame.

In the extended beacon format, totally 58 bits are added for the node to collect

necessary information from its neighbors. The status bits are always present. It

allows the neighbor nodes knows the status of each other. The value “01” means

uncovered, “10” means covered and “11” means inDS.

A broadDS(i, c) message is simply a beacon with status value “11” and color value c where i is the source address (SA). Because it is already part of the beacon, it does not need to be included in the extension.

A announce(initiator, sender, color) is a beacon with all the extension. Sender is the SA, we only need to add initiator and color along with the status. Since the

announce message are sent out every initMax beacon periods, the overhead of the

beacon extension is not much.

7.3.4 Correctness of the MTCDS Protocol

In this subsection, we prove that the MTCDS protocol generates a CDS as long

as the network topology remains connected and stable for a period of time.

Lemma 9 A unique initiator will be selected by the initiator election protocol within

bounded beacon periods if the network topology remains connected and stable.

Proof.

123 802.11a Beacon Frame Extension Status Color Initiator Time Stamp Beacon Interval ...... (2) (8) (48)

~ 550 bits 58 bits

Figure 7.3: Beacon Frame Format

We will prove that the node with the smallest ID (say, node i) will be selected as the initiator. Initially each node sets its initiator to MAXINIT . This means no initiator is elected yet. When the InitT imer expires, it will make itself as the initiator and announces the fact. If the neighbor has a larger initiator, it will accept the new initiator value and forwards the message further. If we looks at the node i, each of i’s neighbors will set its initiator to i. The initiator value will stay as i because i is the smallest. This process repeats until it reaches all the nodes in the network. Since the network is connected and stable, each node will receive the announcement and set its initiator as i. Let set initMax large enough to ensure the announcement of initiator from i reaches every other node in the network, the whole network will agree i is the initiator. When the initT imer of node i expires and finds that its initiator is itself, node i knows the initiator is elected. The next phase of the protocol (dominating set construction) can start.

124 Lemma 10 A new initiator will be selected by the initiator election protocol within bounded beacon periods if the original initiator crashes or leaves the network assuming the network remains connected and stable otherwise.

Proof.

From the initiator election protocol, we can see that original initiator will set out

ANNOUNE message every initMax beacon periods. Other nodes only forwards

ANNOUNE message if its initiator is bigger than the initiator in the message or the color value is different. If the original initiator is active, its color value will change every initMax beacon periods, the refresh ANNOUNCE will keep the InitT imer of other nodes from expiring.

When the original initiator crashes or leaves the network, all other nodes agree on the initiator and the color value of these nodes will also be the same. Their initT imer will expire since no more refresh ANNOUNCE messages are coming.

After the expiration, it sets all the state information to initial values and the initiator election will kick in again. According to Lemma 9, a unique initiator will be selected.

Now we would like to prove that our MTCDS protocol successfully determines the connected dominating set for the whole network.

Theorem 4 If the network topology remains stable for a period of time, the collection of all inDS nodes resulted from the MTCDS protocol forms a connected dominating set for the entire network.

Proof.

125 We claim that if the network topology is unchanged, eventually all the inDS nodes

will forms a dominating set and the induced graph is connected.

We prove by induction on number of stations n.

Induction base: when n = 1, the only station is the initiator. The initiator enters

inDS after election. It is a connected dominating set. The above claim is true.

Induction hypothesis: assume We have CDS covering up to k − 1 nodes. We denote of graph with k − 1 nodes as G(k − 1).

Induction step: now let’s see a new station (node k) joins the network. If one of

its neighbor is a inDS node, then the CDS covering G(k − 1) will cover G(k) and is

still a CDS.

If none of its neighbor is a inDS node, all the neighbors of k are covered nodes due

to the existence of CDS in G(k − 1). According to the protocol, one or more of k’s

neighbor will have its DSTimer expires and enters DS. After that, there will be no

more uncovered node, we have a dominating set. Since the newest inDS node enters

DS from covered status, it must have a inDS neighbor. (A node enters covered status

only after it receives broadDS message from a inDS node) The CDS covering G(k−1)

plus the new inDS node will be a CDS covering G(k) and the DS is connected.

7.3.5 Station Mobility Handling

Now we would like to show that the MTCDS protocol can adapt to station mo-

bility. This is done by showing that the protocol successfully maintains a CDS under

changes of network topology, which includes the following four cases.

1. Initiator leaves the network.

126 2. New node joins the network after the construction of CDS.

3. Redundant inDS node can changes its status while still keeping the dominating

set connected.

4. inDS node in the CDS leaves the network

Case 1 is proved in lemma 10, case 2 is the exact situation in theorem 4. From the protocol, we can see if a node has only inDS neighbors, it will change its status to covered. The total number of inDS nodes is reduced. This can happen if several inDS node movement.

Case 4 is handled by the color scheme. From the protocol, we can see that a node changes its color only after receiving a larger color value from inDS node. Since initiator keeps increasing its color value, if the CDS is intact, the color difference of neighbor node should be very small. If the CDS is broken into several segments, the segment that contains the initiator will keep increasing its color value while other segments will have the color value unchanged. When a node sees two neighbors with large color difference, it can consider itself a border node between the disconnected segments and enters inDS. This process will continue until a CDS is re-constructed.

The threshold value of large color difference is decided by the maximum moving speed of the station and the diameter of the MANET. It should be large enough to distinguish the station movement from network disjoints.

127 7.4 Implementation Considerations

There are two implementation issues to consider in our protocol: The first is the suitable value for initMax in initiator election phase; the second is the trade-off between the size of the beacon and the size of the dominating set.

The value of initMax plays an important role in the initiator election. It has to be big enough for minimum id information to propagate throughout the network.

Intuitively, if the node with minimum id is at the boundary of the network, the value of initMax has to be at least the diameter of the network for the protocol to come up with one single initiator. If the size of initMax is too small, the first phase will end up with multiple initiators and thus can not guarantee the dominating set obtained at the end of the second phase is still connected. On the other hand, if initMax is set too big, it seems that the protocol (especially the first phase of it) will take too much time. Additionally, in case of topology change due to nodal mobility, the protocol with large initMax value may take some time to converge. In theory, the value of initMax should be proportional to the diameter of the network. However, since it is too costly for each node to learn the size of the network, it is not practical to determine the value of initMax at run time.

Although this issue shows that our protocol may not be scalable, in reality, this is not a serious problem even for a pretty large ad hoc network. The reason is because

IEEE 802.11 beacon period is merely 0.1 second. When the node with minimum id transmits its beacon, its id information is basically flooding throughout the network.

In other words, even though beacon transmissions are not reliable, the minimum id information can reach other nodes through all possible routes and thus will not be affected much by the unreliable beacon transmissions. For instance, for an ad hoc

128 initMax

initMax (seconds)

2.8 2.6 2.4 2.2 2 1.8 1.6 1.4 1.2 1

1 0.9 0.8 0.7 10 0.6 11 0.5 beacon success rate 12 13 0.4 grid size (m) 14 0.3 15 0.2

Figure 7.4: initMax for m × m grid under various beacon success rate

network with 1000 stations uniformly distributed in a 15×15 grid, setting initMax to

3 second (i.e., 30 beacon periods) almost guarantees that the minimum information will reach all other nodes in time even when the beacon successful rate is merely 0.3.

This is shown in Figure 7.4.

Another issue is the trade-off between the size of beacon and the size of the domi- nating set when topology changes. When the network topology changes due to nodal mobility, as described in section 7.3.5, our protocol is still able to come up with a connected dominating set. There are few cases a non-dominator will switch to dom- inating state (e.g., new station enters the network or some covered stations become uncovered due to movement and their covered neighbors may switch to dominating

129 state). However, the only case a node in dominating set will switch to covered state

is when all its neighbors are in the dominating set. It seems as time goes by when

network topology changes occur, the size of the CDS may grow bigger and bigger.

The reason some nodes in CDS can not be removed from the set is actually due to

the lack of enough information. For instance, assuming each node randomly selects

one dominator neighbor and includes that neighbor’s id in the beacon, a dominator

can safely switch to covered state when the following statements hold.

• The beacons it received from all its neighbors have a different dominator.

• It has at least one dominator neighbor.

Although this approach does not introduce any new message, it certainly increases the size of each beacon by 48 bits and thus may not be justifiable. Of course, another easy resolution to this issue is to simply set a timer at each node when running this protocol. When this timer expires, the protocol executes from scratch again to ensure the resulting CDS remains a competitive size.

7.5 Performance Studies

The MANET consists of n stations randomly distributed over a m × m grid.

Transmission range of a single station is normalized to 1 unit of distance. Two stations

are neighbors if their distance is less than or equal to 1. We ran the simulation on

4 × 4 and 8 × 8 grid respectively. We compare our protocol with Wu’s [48] and Wan’s

[44] protocols.

Let Tmax = 100, initMax = 20, δt = 4, α = 1. For 4 × 4, MTCDS’s DS size

ranges between 11 to 13, Wan’s protocol ranges between 13 to 22 and Wu’s protocol

ranges between 16 to 55. MTCDS outperforms the other two protocols easily.

130 55 MTCDS Wan 50 Wu 45

40

35

30 DS size

25

20

15

10 50 100 150 200 250 Number of stations

Figure 7.5: DS size in 4 x 4 grid

Two characteristics of the MTCDS is worth elaboration. First, MTCDS is not too sensitive of number of stations. The curve is very flat, that implies very good scalability. Secondly, the DS size is even smaller when n = 256 than that of n = 128.

It is counter intuitive. After going through the simulation, we found that the favorable location of the initiator in 256-node network is the reason for the slight difference.

Overall MTCDS is very scalable, the location of initiator has some impact but the impact is quite minor if the nodes are randomly distributed and the number of stations is large.

For 8 × 8 grid, MTCDS’s DS size ranges between 44 to 49, Wan’s protocol ranges between 61 to 75 and Wu’s protocol ranges between 72 to 132. It follows the same performance pattern.

131 140 MTCDS 130 Wan Wu 120

110

100

90

DS size 80

70

60

50

40 140 160 180 200 220 240 Number of stations

Figure 7.6: DS size in 8 x 8 grid

On average, MTDS’s DS size is about 65% of that of Wan’s protocol and about

40% of Wu’s protocol.

7.6 Framework Extension

The MAC-layer timer-based CDS construction can be generalized to be a frame- work for distributed greedy algorithms in MANETS. As long as the MAC-layer of the MANET has periodically frame transmission, the timer-based algorithm can pig- gyback the signaling messages with these periodically transmissions. The result is significant savings on the control messages. Another important characteristic of the timer-based framework is that only one-hop local information is needed to carry out all the decisions. This is critical for the performance of MANETs. Since the stations in a MANET keep moving around, it is difficult to gather information that is beyond one-hop. The third benefit of the timer-based framework is that the maintenance of

132 the structure can be achieved without additional control or signally messages. The pe- riodically frame transmission is served as the base for maintenance messages. No more control messages are needed. The framework is done at the MAC-layer. Since the topology information is available at MAC-layer and the periodically frame transmis- sion ensures that the most current topology information is available. This is helpful to implement some of the network layer protocols in the MAC-layer. This cross-layer design not only adapts better to topology changes, it also avoids the network-layer control messages. For example, the CDS is normally constructed at the network- layer. A lot of overhead will be involved if this is done in network-layer. Routing is another example. Regardless link-state protocols or distance vector protocols, a lot of messages are needed in the network-layer to make the protocols feasible. By using our time-based framework, we can avoid all these hassles. The timer-based framework is also a very good choice for distributed greedy algorithms. Since many of the problems in the MANETS are NP-complete problems. Heuristics are needed.

Very often the greedy algorithms yield good approximations to the optimal solutions.

From the performance of MTCDS, we can confirm that.

Based on the above observation, we extend our timer-based framework into the problem of energy-aware CDS. Instead of using the number of the uncovered sta- tions as the metric, the construction energy-aware CDS uses the energy level of each station. The metric can also be a combination. For example, the metric can be

< energy level, number of neighbors >. Energy level is used as the primary factor for the ordering. The number of neighbors can be a secondary factor. By doing that, both the life span of a MANET and the size of the CDS are optimized. If we can the

133 metric to be < number of neighbors, energy level >, then the size of the CDS is em-

phasized. The framework is very flexible. We propose a energy-aware CDS protocol

called TECDS in [21]. Simulation shows that the size of the connected dominating

set connected by TECDS is constantly smaller than the current CDS protocols and

the life span of the MANET is longer than that of the current CDS protocols.

7.7 Summary

In this chapter, we present a MAC-Layer Timer-based Connected Dominating Set

Construction Protocol (MTCDS). Unlike protocols proposed in [48] [44], our MTCDS protocol does not require a reliable data link layer to deliver messages between neigh- bors. All necessary data for the protocol is obtained via beacon exchanges in the

MAC layer. One advantage of constructing a CDS in the MAC layer is that it re- sponds to network topology changes more quickly than if it is done at a higher layer.

In the MTCDS protocol, a candidate station sets up a timer based on the number of uncovered neighbors and determines whether or not to join the CDS when the timer expires. MTCDS is simple, distributed, inexpensive (i.e., with no extra messages), and adaptive to station mobility. The simulation results show that our protocol can construct connected dominating set using 35% to 60% less nodes than other protocols.

We are able to generalize the timer-based protocol into a framework. The frame- work can be applied to construct energy-award CDS. The result is that we are able to construct a connected dominating set with small cardinality and long network life span. The framework can be the building block for any greedy algorithm in

MANETS and any metric can be used as the greedy factor. The metric can also be a combination. This will allow the optimization of several aspects of the MANETS.

134 The benefits of the framework can be summarized as: significant savings on the control messages, less information gathering (only one-hop local information is needed), less overhead on the structure maintenance, better adaptation to station mobility and control message saving of upper level protocols.

135 CHAPTER 8

CONTRIBUTIONS AND FUTURE WORK

We conclude the dissertation in this chapter by summarizing the research contri- butions. We also outline the potential new research directions for future study.

8.1 Research Contributions

We reviews the scalability issue of the 802.11 timing synchronization function[19].

The scalability problem becomes a more important problem with the rapid advance- ment of data rate for newer generation 802.11 networks.

Through the study of ATSP protocol proposed in [19], we find that ATSP suffers two problems: the maximum clock difference between the fastest station and the slowest station may shoot up to over 500 µs for some occasions even when the hosts are stationary, the clock may be out of synchronization when the fastest station leaves the IBSS[23]. We analyze why ATSP suffer from these problems and then propose new remedies to improve the performance. We then proposed two protocols: TATSF and ABTSF. These protocols can address the problems suffered by ATSP.

By careful examination of the clock models and reasons for clock adjustment errors, we are able to design a compatible protocol called SATSF[52]. SATSF meets all the desirable requirements: simple, scalable, accurate, compatible, bounded and

136 adaptive to station mobility. For SATSF, the maximum clock offset can be controlled

within 20 µs. In addition, SATSF is completely compatible with the current 802.11

TSF protocol by keeping the beacon frame format intact. This is very important for

SATSF to be deployed in a mixed-mode IBSS.

After getting satisfying synchronization accuracy in a single-hop IBSS, we expand our work to address the scalability problem in a 802.11-based MANET. The single- hop solutions cannot be adopted directly into the MANET. Simply giving priority to the fastest station(s) will not be enough. It may take very long time for the timing information of the fastest station to reach the stations many hops away. We propose a new protocol called multihop adaptive timing synchronization function (MATSF).

For MATSF, the maximum clock difference can be controlled within 50 µs [53]. The

improvement is more than 400% over the current solutions of similar complexity.

The protocol converges in less than 10 seconds. It converges several times faster than

current solutions.

We also study the problem of connected dominating set construction in MANETs.

We present a MAC-Layer Timer-based Connected Dominating Set Construction Pro-

tocol. There are many advantages by constructing dominating set in the MAC layer.

It can detect topology changes quickly; the resulting dominating set can be utilized

by upper layer protocols such as routing protocols. Most of the information needed

by the protocol is already available in the underline time synchronization protocol.

There is little or no overhead by piggybacking on the existing TSF. Only one hop

neighbor information is needed. It is better equipped to handle mobility and topology

changes due to this fact. The simulation results show that our protocol can construct

137 connected dominating set using 35% to 60% less nodes than other distributed con- nected dominating set protocols.

The timer-based CDS solution can be easily extended to the distributed implemen- tation of greedy algorithms in multihop ad hoc networks. We are able to construct an energy-aware connected dominating set with smaller size and the resulting network has a longer life span than the current solutions[21]. This framework can be applied to optimize other facts of mobile ad hoc networks in a simple and efficient way.

8.2 Future Work

Wireless technologies have experienced tremendous growth during the last decade.

It fundamentally changes the lifestyle of people around the world. The productivity gain and life style enhancement brought by the wireless communication cannot be matched by the wired networks. These are the driving forces behind the explosive wireless network expansion. Wireless networks are more complex that wired net- works. These complexities contribute to the development of a very diverse array of wireless technologies: Bluetooth, Ultra Wide Band (UWB), Wi-Fi (802.11), Wi-Max

(802.16), Mobile-Fi (802.20), 2G cellular (TDMA, CDMA, GSM), 3G cellular (UMTS,

CDMA2000, TD-SCDMA) and 4G wireless. Each technology has its own strength and weakness. They will co-exist for a long time. One of the future research problems is to study the clock synchronization in a diverse wireless environment. This problem will be a much hard problem and deserve attentions from the research communities.

Even though the role of wireless networks has been highlighted through numerous milestones the last few decades, the capacity advantage, quality of service guarantee and reliability of the wired networks are still far superior. The wide deployment

138 of fiber and the advancement of technologies like wavelength multiplexing allow the wired network to carry tremendous amount of traffic. One single channel can carry 40

Gbps and the DWDM technology allows one single fiber to be divided into hundreds of channels[49]. Multi Protocol Label Switching technology allows efficient resource allocation and rapid failover upon the detection of network element failures[50]. The problem of wireless and wired networks integration is another important topic worth exploring. Recently a new architecture based on IP Multimedia Subsystems (IMS) has gaining attentions. IMS tries to facilitate the seemly integration of wire line and wireless network. A lot of issues can be investigated in the IMS framework (e.g. location based service, hierarchical handoff and end to end QOS).

Security and self-center behavior are other important areas for wireless research.

The propagation characteristics of radio communication makes the wireless networks more vulnerable. Hackers and attackers do not need to physically inside the facilities to launch attack against wireless infrastructure. The security schemes used in wireline networks may need a lot of computational power and may not be energy efficient. How to adapt these schemes in the wireless networks with less energy and computational cost will be a challenging problem. The mobility of stations may pose further hurdle to detect and shut down security threats. Selfish behavior is very common among wireless users due to the energy limitation. Very often, the system performance will deteriorate if some participates do not run as specified in the protocols instead they behave according to their own interests only. Many of the protocols in the wireless systems need to be re-designed to cope with this phenomenon. A lot of research is required in these areas.

139 Wireless QOS is another area of further research effort. The voice quality and drop call rate is still very high in wireless networks. The data throughput is low; end- to-end delay is high and jitter is also high. The wireless systems are not as reliable as wireline system. Self-healing and fast restoration capabilities commonly expected in wireline systems such as SONET and MPLS networks are not available in wireless systems yet.

Sensor networks are attracting a lot of attention due to their broad applications.

The clock synchronization and dominating set construction in the context of sensor networks will bring new issues and challenges. We need to decide whether the tech- niques we have studied in the 802.11 ad hoc networks can be applied directly to sensor networks. If not, what kinds of changes are needed to meet the special requirements and characteristics of the sensor networks.

In summary, there are still a lot of areas in wireless communications that are difficult while the needs to resolve them are pressing. We hope that with the advances made through multiple disciplines, most of the problems can be resolved soon in the near future. The world communication systems become fully integrated and are able to meet the endless demands of mass communications.

140 APPENDIX A

ABBREVIATIONS

ABTSF Adaptive Bi-directional Timing Synchronization Function

AMPS Advance Mobile Phone Services

ANSI American National Standards Institute

ASP Automatic Self-correcting Procedure

ATIM Ad hoc Traffic Indication Message

ATM Asynchronous Transfer Mode

ATSP Adaptive Timing Synchronization Procedure

BSS Basic Service Set

BP Beacon Period

CDMA Code Division Multiple Access

CDS Connected Dominating Set

CSMA Carrier Sense Multiple Access

CTS Clear To Send

DS Dominating Set

DSSS Direct Sequence Spread Spectrum

DWDM Dense Wavelength Division Multiplex

141 EDGE Enhanced Data-rate for GSM Evolution

ETSI European Telecommunications Standards Institute

EVDO Evolution Data Only

EVDV Evolution Data and Voice

FDM Frequency Division Multiplex

FDMA Frequency Division Multiple Access

FHSS Frequency Hopping Spread Spectrum

GPRS General Packet Radio Service

GPS Global Positioning System

GSM Global System for Mobile Communications

HMS Hierarchical Master-Slave

IBSS Independent Basic Service Set

IEEE Institute of Electrical and Electronics Engineers

IMS IP Multimedia Subsystem

ISDN Integrated Services Digital Network

IP Internet Protocol

ITU-T International Telecommunications Union - Telecommunications

LAN Local Area Network

LLC Logical link control

LORAN LOng Range Navigation

MAC Media Access control

MANET Mobile Ad-hoc Network

MATSF Multihop Adaptive Timing Synchronization Function

MDS Minimum Dominating Set

142 MIMO Multiple Input Multiple-Output

MPLS Multi Protocol Label Switching

MSDU MAC Service Data Unit

MTCDS Multihop Timer-based Connected Dominating Set

NAVSTAR Navigation Satellite Tracking and Ranging

NP Nondeterministic Polynomial time

NTP Network Time Protocol

OFDM Orthogonal Frequency Division Multiplexing

OSI Open Systems Interconnection

PBX Private Branch Exchange

PDA Personal Digital Assistant

PDH Plesiochronous Digital Hierarchy

PLL Phase-Locked-Loop

PRS Primary Reference Source

PS Power Saving

PSTN Public Services Telephone Networks

QOS Quality Of Service

RBS Reference Broadcast Synchronization

RTS Request To Send

SATSF Self Adjusting Timing Synchronization Function

SDH Synchronous Digital Hierarchy

SONET Synchronous Optical Network

TATSF Tiered Adaptive Timing Synchronization Function

TBTT Target Beacon Transmission Times

143 TDD Time Division Duplex

TDMA Time Division Multiple Access

TD-SCDMA Time Division Synchronous Code Division Multiple Access

TSF Timing Synchronization Function

UMTS Universal Mobile Telecommunications System

UTC Coordinated Universal Time

UWB Ultra Wide Band

VOIP Voice Over IP

W-CDMA Wideband CDMA

Wi-Fi Wireless Fidelity

Wi-Max Wireless Microwave Access

144 BIBLIOGRAPHY

[1] IEEE Std 802.11. Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) specification. ANSI/IEEE Standard, 1999.

[2] IEEE Std 802.11a. Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) specification. ANSI/IEEE Standard, 1999.

[3] IEEE Std 802.11b. Higher-Speed Physical Layer Extension in the 2.4 GHz Band. ANSI/IEEE Standard, 1999.

[4] IEEE Std 802.11g. Amendment 4: Further Higher Data Rate Extension in the 2.4 GHz Band. ANSI/IEEE Standard, 1999.

[5] L. Bao and J. J. Garcia-Luna-Aceves. Topology Management in Ad Hoc Net- works. Proceedings of MobiHoc, pages 129–140, 2003.

[6] S. Bregni. A Historical Perspective on Telecommunications Network Synchro- nization. IEEE Communications Magazine, pages 158–166, June 1998.

[7] S. Bregni. Synchronization of Digital Telecommunications Networks. John Wiley & Sons, Inc, First edition, 2002.

[8] J. Broch, D. Maltz, D. Johnson, Y. Hu, and J. Jetcheva. A Performance Compar- ison of Multi-Hop Wireless Ad Hoc Networking Routing Protocols. Proceedings of MobiCom, 1998.

[9] S. Butenko, X. Cheng, D. Z. Du, and P. Pardalos. On the construction of virtual backbone for ad hoc wireless networks. Proceedings of the 2nd Conference on Cooperative Control and Optimization.

[10] M. Cagalj, J. P. Hubaux, and C. Enz. Minimum-Energy Broadcast in All- Wireless Networks : NP-Completeness and Distribution Issuses. Proceedings of the ACM Mobicom, pages 2842–2846, September 2002.

[11] J. Cartigny, D. Simplot, and I. Stojemenovic. Localized minimum-energy broad- casting in ad-hoc networks. IEEE Infocom, 2003.

145 [12] J. H. Chen and W. C. Lindsey. Network Frequency Synchronization with Appli- cation - Part-I: General Theory. Proceedings of Milcom, 1998.

[13] S. Datta and I. Stojmenovic. Internal Node and Shortcut Based Routing with Guaranteed Delivery in Wireless Networks. Cluster Computing, 5:169–178, 2002.

[14] J. Elson, L. Girod, and D. Estrin. Fine-Grained Network Time Synchronization using Reference Broadcasts. Proceedings of the Fifth Symposium on Operating systems Design and Implementation, pages 147–163, 2002.

[15] M. R. Garey and D.S. Johnson. Computers and Intractability-A Guide to the Theory of NP-Completeness. Freeman, 1979.

[16] M. S. Gast. 802.11 Wireless Networks: The Definitive Guide. Addison-Wesley, First edition, 2002.

[17] S. Guha and S. Khuller. Approximation Algorithms for Connected Dominating Sets. Algorithmica, 20(4):374–387, 1998.

[18] D. S. Hochbaum. Approximation Algorithms for NP-Hard Problems. PWA Pub- lishing Company, 1995.

[19] L. Huang and T. H. Lai. On the Scalability of IEEE 802.11 Ad Hoc Networks. Proceedings of ACM MobiHoc, 2002.

[20] L. Huang, T. H. Lai, and D. Zhou. On the Scalability of IEEE 802.11 Ad Hoc Networks. submitted to ACM/Baltzer Journal on Wireless Networks (WINET), 2005.

[21] B. Kim, J. Yang, D. Zhou, and M. T. Sun. Energy-Aware Connected Dominating Set Construction in Mobile Ad Hoc Networks. Proceedings of 14th IEEE Interna- tional Conference on Computer Communications and Networks, pages 229–234, 2005.

[22] H. Kopetz and W. Schwabl. Global time in distributed real-time systems. Tech- nical Report 15/89, technische Universitat wien, 1989.

[23] T. H. Lai and D. Zhou. An Efficient and Scalable Timing Synchronization Func- tion for IEEE 802.11 Ad Hoc Networks. Proceedings of 17th IEEE International Conference on Advanced Information Networking and Applications, pages 318– 323, 2003.

[24] L. Lamport. Time, clocks and the ordering of events in distributed systems. Communications of the ACM, 21(7):558–565, 1978.

146 [25] Q. Li and D. Rus. Global Clock Synchronization in Sensor Networks. Proceedings of Infocom, 2004.

[26] Y. B. Lin and I. Chlamtac. Wireless and Mobile Network Architectures. John Wiley & Sons, Inc, First edition, 2001.

[27] W. C. Lindsey. Network Synchronization. Proceedings of IEEE, 73(10):1445– 1467, Oct. 1985.

[28] W. C. Lindsey and J. H. Chen. Mutual Clock Synchronization in Global Digital Communication Networks. Europe Transaction on Telecommunication (Focus on Synchronization of Digital Networks), 7(1), Jan. 1996.

[29] D. L. Mills. Internet time synchronization: the network time protocol. IEEE Transaction on Communications, pages 1482–1493, 1991.

[30] B. O’Hara and A. Petrick. IEEE 802.11 Handbook: A Designer’s Companion. IEEE Press, First edition, 1999.

[31] S. PalChaudhuri, A. K. Saha, and D. B. Johnson. Adaptive clock synchroniza- tion in sensor networks . Proceedings of the Third International Symposium on Information Processing in Sensor Networks, pages 340–348, 2004.

[32] N. Reid and R. Seide. 802.11 (Wi-Fi) Networkinhg Handbook. McGraw- Hill/Osborne, First edition, 2003.

[33] C. H. Rentel and T. Kunz. A Non-hierarchical convergent timing synchronization function for real-time QoS support in Wireless LANs: Towards an Autonomous Network Synchronization Algorithm for Wireless Ad Hoc networks. Wireless World Research Forum, 2004.

[34] C. H. Rentel and T. Kunz. Network Synchronization in Wireless Ad Hoc Net- works. Technical Report, Carleton University, 2004.

[35] K. Romer and E. Zurich. Time synchronization in ad hoc networks. Proceedings of MobiHoc, 2001.

[36] P. Roshan and J. Leary. 802.11 Wireless LAN Fundamentals: A practical guide to understanding, designing, and operating 802.11 WLANs. Cisco Press, First edition, 2003.

[37] J. P. Sheu, C. M. Chao, and C. W. Sun. A Clock Synchronization Algorithm for Multi-Hop Wireless Ad Hoc Networks. Proceedings of ICDCS, pages 574–581, 2004.

147 [38] R. Sivakumar, P. Sinha, and V. Bharghavan. CEDAR: a Core-Extraction Dis- tributed Ad Hoc Routing Algorithm. IEEE Journal on Selected Areas in Com- munication, 17(8):1–12, aug 1999.

[39] J. So and N. Vaidya. MTSF: A Timing Synchronization Protocol to Support Syn- chronous Operations in Multihop Wireless Networks. Technical Report, UIUC, 2004.

[40] I. Stojemenovic, M. Seddigh, and J. Zunic. Dominating Sets and Neighbor Elimination-Based Broadcasting Algorithm in Wireless Networks. IEEE Trans- actions on Parallel and Distributed Systems, 13(1):14–25, 2002.

[41] M. Sun, W. Feng, and T.H. Lai. Location Aided Broadcast in Wireless Ad Hoc Networks. Proceedings of the IEEE GLOBECOM, pages 2842–2846, November 2001.

[42] C. K. Toh. Ad Hoc Mobile Wireless Networks: Protocols and Systems. Prentice Hall PTR, First edition, 2002.

[43] Y. C. Tseng, S. Y. Ni, Y.S. Chen, and J. P. Sheu. The Broadcast Storm Prob- lem in a Mobile Ad Hoc Network. ACM/Baltzer Journal on Wireless Networks (WINET), pages 153–167, 2002.

[44] P.J. Wan, K. M. Alzoubi, and O. Frieder. Distributed Construction of Con- nected Dominating Set in Wireless Ad Hoc Networks. Proceedings of the IEEE INFOCOM, pages 1597–1604, 2002.

[45] Y. Wang and J. J. Garcia-Luna-Aceves. Collision avoidance in multi-hop ad hoc networks. Proceedings of the IEEE MASCOTS, pages 145–154, 2001.

[46] J. Wu. Extended Dominating-Set-Based Routing in Ad Hoc Wireless Networks with Unidirectional Links. IEEE Transactiosn on Parallel and Distributed Com- puting, 22(1):327–340, 2002.

[47] J. Wu, F. Dai, M. Gao, and I. Stojmenovic. On Calculating Power-Aware Con- nected Dominating Sets for Efficient Routing in Ad Hoc Wireless Networks. Journal of Communications and Networks, 4(1), March 2002.

[48] J. Wu and H. Li. A Dominating-Set-Based Routing Scheme in Ad Hoc Wireless Networks. special issue on Wireless Networks in the Telecommunication Systems Journal, 3(7):63–84, 2001.

[49] D. Zhou and T. H. Lai. Backup Group Multiplexing: An Integrated Restoration Strategy for IP over WDM Optical Networks. Proceedings of the International Conference on Computer Network and Mobile Computing, pages 235–240, 2001.

148 [50] D. Zhou and T. H. Lai. Efficient Resource Allocation in Self-Healing Mesh Multiprotocol Label Switching Networks. Proceedings of GlobeCom, pages 2671– 2675, 2001.

[51] D. Zhou and T. H. Lai. Analysis and Implementation of Scalable Clock Syn- chronization Protocols in IEEE 802.11 Ad Hoc Networks. Proceedings of IEEE International Conference on Mobile Ad-hoc and Sensor Systems, pages 255–263, 2004.

[52] D. Zhou and T. H. Lai. A Compatible and Scalable Clock Synchronization Protocol in IEEE 802.11 Ad Hoc Networks. Proceedings of the 34th International Conference on Parallel Processing, pages 295–302, 2005.

[53] D. Zhou and T. H. Lai. A Scalable and Adaptive Clock Synchronization Protocol in IEEE 802.11-Based Multihop Ad Hoc Networks. Proceedings of the second IEEE International Conference on Mobile Ad-hoc and Sensor Systems, 2005.

[54] D. Zhou, M. T. Sun, and T. H. Lai. A Timer-based Protocol for Connected Dominating Set Construction in IEEE 802.11 Multihop Mobile Ad Hoc Networks. Proceedings of the 2005 IEEE International Symposium on Application and the Internet, pages 2–8, Jan. 2005.

149