The present invention relates generally to networks of devices. More specifically, maintaining a global time reference in an ad hoc wireless network is disclosed.
Wireless networks are becoming increasingly important as solutions for transferring data among devices that move, are located in a home, or are otherwise situated so that it is desirable to connect the devices without wires. Numerous physical and MAC layer solutions have been proposed. For example, a baseband ultra wideband wireless network is described in U.S. patent application Ser. No. 09/393,126“Baseband Wireless Network for Isochronous Communication” by Aiello, et. al., which is herein incorporated by reference. An ultra wide band network transmits a signal that covers a very large portion of the frequency spectrum but transmits at a very low power in any individual frequency band.
Wireless networks are sometimes referred to as ad hoc networks because the network is comprised of devices that happen to be within the broadcast vicinity of the other devices in the network. Devices may join or leave the network as they are powered up or move out of range. A particular ad hoc network is described in the HIPERLAN Type 1, Functional Specification, ETS 300 652 published by the European Telecommunications Standards Institute. It is available at www.etsi.org.
For an application such as the one shown in
Accordingly, a system and method for maintaining a global time reference among a group of wireless devices participating in a wireless network is disclosed. It should be noted that the techniques described herein may also be applied to other networks including certain networks that transmit signals partially or wholly using wires, fiberoptic cables or other means. For the purposes of example, this specification will describe in detail a wireless network and in particular a wireless ad hoc network that uses the HIPERLAN standard. It should be appreciated that the invention is not limited to such a network and that the techniques described are applicable to many different types of networks.
In one embodiment, each device in a network maintains its own clock. Instead of designating the clock of one particular device as the master clock, each device transmits its own clock signal or part of its own clock signal when it sends a packet to other devices in the network. The devices receiving the packet read the clock signal and adjust their own clocks to the transmitted value. This clock adjustment is made in a manner that causes the clocks to smoothly approach a common value without oscillating in an unstable manner.
It should be appreciated that the present invention can be implemented in numerous ways, including as a process, an apparatus, a system, a device, a method, or a computer readable medium such as a computer readable storage medium or a computer network wherein program instructions are sent over optical or electronic communication links. Several inventive embodiments of the present invention are described below.
In one embodiment, synchronization is maintained among a plurality of network devices having local clocks that participate in a network. A first packet is broadcast from a first network device to other network devices that participate in the network. The first packet includes a global time reference derived from the local clock of the first network device. The clocks of the network devices that receive the first packet are adjusted to be closer to the local clock of the first network device.
In one embodiment, a first network local time reference and a second network local time reference are maintained for a device that participates in a first network and a second network. A free running clock is maintained on the device. The difference between the free running clock and a first network global time reference is determined. A first network offset is calculated to account for the difference between the free running clock and the first network global time reference. The difference between the free running clock and a second network global time reference is determined. A second network offset is calculated to account for the difference between the free running clock and the second network global time reference.
These and other features and advantages of the present invention will be presented in more detail in the following detailed description and the accompanying figures which illustrate by way of example the principles of the invention.
The present invention will be readily understood by the following detailed description in conjunction with the accompanying drawings, wherein like reference numerals designate like structural elements, and in which:
A detailed description of a preferred embodiment of the invention is provided below. While the invention is described in conjunction with that preferred embodiment, it should be understood that the invention is not limited to any one embodiment. On the contrary, the scope of the invention is limited only by the appended claims and the invention encompasses numerous alternatives, modifications and equivalents. For the purpose of example, numerous specific details are set forth in the following description in order to provide a thorough understanding of the present invention. The present invention may be practiced according to the claims without some or all of these specific details. For the purpose of clarity, technical material that is known in the technical fields related to the invention has not been described in detail so that the present invention is not unnecessarily obscured.
So long as there is only one transmitter and one receiver, the inter packet timing can be corrected at the receiver if a timestamp is included at the beginning of each packet. The difference between each of the timestamps would indicate the correct relative time spacing of the packets enabling the receiver to reposition or perhaps even reorder the packets in time.
When there are more than two devices, then simply timestamping the packets will not synchronize the display of data among the devices. It should also be noted that even when there are only two devices, the timestamp can adjust the relative spacing between packets but it does not facilitate making sure that events occur on the receiver at a specific time relative to an event occurring at the transmitter. Referring back to the example shown in
In order to synchronize the video or audio display of information received in packets over the wireless network or otherwise coordinate the use of information received from packets, a clock is maintained on each of the network devices that is in synchronization with the clocks on each of the other network devices.
In one embodiment, a clock is specified for each network device that needs to be correct only to about 5 parts per million. In order to maintain acceptable synchronization between all of the device clocks on the network, each time one of the devices transmits a packet, the device includes in the packet header at a well defined point the value or, as described below, part of the value of its clock. When the other devices receive that packet, they adjust each of their respective clocks toward the time indicated by the timestamp. As described below, in one embodiment, the time adjustment is implemented by calculating a clock offset and the clock offset is calculated by taking half the difference between the device clock and the timestamp.
It should be noted that ideally, the local time reference of the transmitter will agree with the local time reference kept at each of the devices participating in the network. If that is the case, then each of the local time references actually is a global time reference because it is in agreement with every other local time reference in the system. For the purpose of this explanation, the local time reference that the transmitter records and then inserts in the packet will be referred to as the global time reference. That is because the transmitter asserts it to be the global time reference and it is the time that all receiving devices will adjust their own local time references toward. It should also be noted that each device considers its own local time reference to be the global time reference and asserts that its own local time reference is the global time reference it transmits a packet. Thus, each transmitting device asserts its local time reference as the global time reference when it includes its local time reference in a packet that it broadcasts to the other devices. Over time, as enough packets are sent, all of the local time references converge to the same global time and the broadcast global time reference results in only small, if any, changes by receiving devices.
Global time reference 306 is inserted in the packet after frame sync sequence 304. In the embodiment shown, the global time reference is inserted immediately after the frame sync sequence, but that is not required. The receiver notes its local time reference at the time when the frame sync sequence is detected and the frame sync sequence signal is asserted. The global time reference from the packet may be read immediately or it may be read much later, so long as it is compared to the time when the frame sync sequence signal is asserted. Thus, global time reference 306 may occur in the packet immediately following frame sync sequence 304 or may occur at a later point in the packet. The remainder of the packet 308 is then sent. The remainder of the packet will likely include further information for the packet header as well as finally the packet payload of data.
It should be noted that in one embodiment, the entire global time reference is not included in the packet. Instead, only the least significant bits, referred to as the least significant part, of the global time reference is included. It is sufficient to include just the least significant part of the global time reference so long as the difference between the clocks is less than the amount of time counted by the least significant part of the global time reference. This condition is met if the amount of drift between the clocks before an adjustment is made is not enough to move the clocks out of synchronization by more than the maximum amount of time that can be represented by the least significant part. In one embodiment, a 32 bit global time reference is used and the least significant part that is transmitted with each packet is the least significant 12 bits of the 32 bit global time reference.
In the embodiment described above, the relative clock drift of the clocks being used is about 5 parts per million (ppm) and the clock rate is 1 MHz. The least significant part of the global time reference can count up to 212 microseconds. Therefore, the clocks would need to be updated before a 212 microsecond error could accumulate. For a 1 MHz clock with 5 ppm accuracy, the maximum time interval between updates would be on the order of about 5 minutes, depending on the method of updating used. Of course, the maximum time interval varies in different systems depending on the speed and accuracy of the clock and the number of bits transmitted with the least significant part of the clock. If more of the global time reference is provided in the least significant part, then the frequency of update is lower. For example, if 14 bits are used, then the least significant part of the global time reference can accurately represent a cumulative drift of up to 214 microseconds. Assuming that the relative clock drift is unchanged, then updates would be required only one fourth as often.
One advantage of the described arrangement where the global time reference is included along with every packet sent by one of the devices participating in the network is that as the amount of network traffic increases, updates of the local time references occur more frequently. This decreases the variance among the local time references.
In different embodiments, the task of broadcasting the entire global time reference may be performed by either one or all of the devices participating in the network. For example, each device may be directed to broadcast the global time reference periodically. The periodic broadcast may be staggered. Alternatively, the MAC layer protocol may direct a designated device to broadcast the entire global time reference at certain intervals.
In different embodiments, adjustments to the local time reference based on the received global time reference are made according to different schemes. In one embodiment, a linear adjustment to the local time reference is made based on the difference between the received global time reference and the local time reference. The adjustment may be represented by the equation:
ΔFRCO=(GTR−LTR)*L.
Where ΔFRCO is the change in the free running clock offset. GTR is the global time reference received with a packet. LTR is the current value of the local time reference stored by the device. As mentioned above, after several packets are received and adjustments are made, the local time references stored on each of the devices will converge toward a single value and that value will be the global time reference. L is a linear factor that adjusts the amount that the free running clock offset is adjusted compared to the difference between the global time reference and the local time reference that is computed. In one embodiment, L is equal to 0.5 and the adjustment to the free running clock offset is equal to half the difference between the received global time reference and the stored local time reference.
Adjustment schemes are used in different embodiments that make non-linear adjustments to the free running clock offset based on the difference between the global time reference and the local time reference. In one embodiment, the change to the free running clock offset is equal to a scaling factor times the square of the difference between the global time reference and the local time reference. Squaring the difference between the two references has the advantage of making greater changes to the free running clock offset if the difference between the global time reference and the local time reference is large. If the square of the difference is used, then the sign of the difference between the global time reference and the local time reference is computed and applied to the difference so that the free running clock offset is adjusted in the proper direction.
In another embodiment, another non-linear adjustment scheme is implemented to allow the system to be more robust. The difference between the global time reference and the local time reference is computed. If the difference is greater than a threshold, then no adjustment is made to the local time reference. If the difference is less than a threshold, then the adjustment is made. Thus, if one of the devices in the network malfunctions or a new device signing on to the network attempts to assert a global time reference that is incorrect and would perturb the global time reference agreed upon by the current devices in the network, that device's assertion of the global time reference may be ignored.
In some embodiments, the threshold test can be turned off under certain circumstances. For example, if more than a certain number of changes are rejected by a device, then the threshold function may be temporarily turned off. This would be appropriate since a device that is receiving a large number of global time references that differ from its local time reference by a great amount most likely is actually incorrect by a large amount. A counter may be used to count the number of recent times that the difference between a received global time reference and the local time reference exceeds the threshold. In one embodiment, the counter is programmed to only count global time references from unique sources so that a single inaccurate source broadcasting repeatedly will be ignored. Both the threshold and the number of times that the threshold must be exceeded to turn off the threshold test may be programmed or may be preset.
The two separate networks can have two separate independent clocks with a device such as device 508 that participates in both networks maintaining two separate clocks. More precisely, the device need only maintain a single free running clock and keep track of two free running clock offsets. Changes are applied to each of the respective free running clock offsets to keep track of the two different global times for the networks. Thus, device 508 may have a single free running clock but two registers used to calculate two different free running clock offsets to adjust the free running clock time to the global time of whichever network it is participating in at a given moment.
Other aspects of the HIPERLAN specification are used to facilitate the implementation of a global time reference shared among the devices of an ad hoc network. For example, the entire global time reference may be periodically broadcast using a Hello packet as described in the specification. The standard Hello procedure is modified to carry the full global time reference. The Hello procedure is described more fully in the HIPERLAN Type 1, Functional Specification, ETS 300 652 at 6.5.4 Neighbour Information Declaration. See also 6.1.14 Neighbour Information Base and 6.1.15 Hello Information Base.
As described above, a device may use the HIPERLAN ID to determine whether a packet belongs to its network and therefore whether to adjust its local time reference toward the global time reference specified in the packet. Also, a reserved network management ID may be used by devices joining the network. Network devices may be configured to ignore time references included in HIPERLAN lookup requests.
Various methods may be implemented to avoid a stable network global time reference from being perturbed by a new device. In one embodiment, new devices are instructed to provide a global time reference of all 0's which is a special value that is ignored by all network devices. Also, a new device is preferably configured to initially set its local time reference to equal a received global time reference instead of adjusting its local reference as described above. Specification of conventions for new devices, however, does not protect against rogue devices that do not observe the correct conventions or devices that belong to other networks. For that reason, other procedures such as checking the HIPERLAN ID or rejecting certain large changes may also be implemented.
Maintaining a global time reference in an ad hoc network has been disclosed. Each device maintains a local free running clock and a local free running clock offset, which together comprise a local time reference. Each free running clock is adjusted toward a received global time reference that is the local time reference of whatever device happens to be broadcasting. In this manner, eventually all of the local time references of devices in the network converge. A device may participate in more than one network by keeping track of one free running clock offset for each network.
Although the foregoing invention has been described in some detail for purposes of clarity of understanding, it will be apparent that certain changes and modifications may be practiced within the scope of the appended claims. It should be noted that there are many alternative ways of implementing both the process and apparatus of the present invention. Accordingly, the present embodiments are to be considered as illustrative and not restrictive, and the invention is not to be limited to the details given herein, but may be modified within the scope and equivalents of the appended claims.
Number | Name | Date | Kind |
---|---|---|---|
4201892 | Schmidt | May 1980 | A |
4586177 | Kaul | Apr 1986 | A |
4587494 | Widlar | May 1986 | A |
4887266 | Neve et al. | Dec 1989 | A |
4979186 | Fullerton | Dec 1990 | A |
5146616 | Tang et al. | Sep 1992 | A |
5235619 | Beyers et al. | Aug 1993 | A |
5253202 | Bronner et al. | Oct 1993 | A |
5274271 | McEwan | Dec 1993 | A |
5307079 | Ross et al. | Apr 1994 | A |
5319218 | Kim et al. | Jun 1994 | A |
5355374 | Hester et al. | Oct 1994 | A |
5363108 | Fullerton | Nov 1994 | A |
5473668 | Nakahara | Dec 1995 | A |
5517505 | Buchholz et al. | May 1996 | A |
5537414 | Takiyasu et al. | Jul 1996 | A |
5546022 | D'Souza et al. | Aug 1996 | A |
5627829 | Gleeson et al. | May 1997 | A |
5644576 | Bauchot et al. | Jul 1997 | A |
5652749 | Davenport et al. | Jul 1997 | A |
5677927 | Fullerton et al. | Oct 1997 | A |
5687169 | Fullerton | Nov 1997 | A |
5687200 | Berger | Nov 1997 | A |
5742592 | Scholefield et al. | Apr 1998 | A |
5790551 | Chan | Aug 1998 | A |
5815537 | Janssen | Sep 1998 | A |
5832035 | Fullerton | Nov 1998 | A |
5901172 | Fontana et al. | May 1999 | A |
5909469 | Frodigh et al. | Jun 1999 | A |
5926501 | Souissi et al. | Jul 1999 | A |
5940452 | Rich | Aug 1999 | A |
5952956 | Fullerton | Sep 1999 | A |
5953344 | Dail et al. | Sep 1999 | A |
5960000 | Ruszczyk et al. | Sep 1999 | A |
5970062 | Bauchot | Oct 1999 | A |
5977822 | Rybicki et al. | Nov 1999 | A |
6014374 | Paneth et al. | Jan 2000 | A |
6031862 | Fullerton et al. | Feb 2000 | A |
6055411 | Ishida et al. | Apr 2000 | A |
6069887 | Geiger et al. | May 2000 | A |
6091717 | Honkasalo et al. | Jul 2000 | A |
6094464 | Ebringer et al. | Jul 2000 | A |
6097707 | Hodzic et al. | Aug 2000 | A |
6115390 | Chuah | Sep 2000 | A |
6133875 | Kishimoto | Oct 2000 | A |
6226277 | Chuah | May 2001 | B1 |
6243583 | Tsutsui et al. | Jun 2001 | B1 |
6246377 | Aiello et al. | Jun 2001 | B1 |
6246702 | Fellman et al. | Jun 2001 | B1 |
6275544 | Aiello et al. | Aug 2001 | B1 |
6278713 | Campbell et al. | Aug 2001 | B1 |
6285662 | Watanabe et al. | Sep 2001 | B1 |
6285873 | Quick, Jr. | Sep 2001 | B1 |
6292153 | Aiello et al. | Sep 2001 | B1 |
6347084 | Hulyalkar et al. | Feb 2002 | B1 |
6480483 | Yahata et al. | Nov 2002 | B1 |
6560215 | Bloem et al. | May 2003 | B1 |
6628642 | Mile'n et al. | Sep 2003 | B1 |
6665308 | Rakib et al. | Dec 2003 | B1 |
6697382 | Eatherton | Feb 2004 | B1 |
6707817 | Kadambi et al. | Mar 2004 | B1 |
6707828 | Wolf | Mar 2004 | B1 |
6816510 | Banerjee | Nov 2004 | B1 |
6850495 | Baum et al. | Feb 2005 | B1 |
6901106 | Chen et al. | May 2005 | B1 |
6903681 | Faris et al. | Jun 2005 | B1 |
6909728 | Kuribayashi et al. | Jun 2005 | B1 |
6934287 | Okamura | Aug 2005 | B1 |
20020131370 | Chuah et al. | Sep 2002 | A1 |
20030179625 | Tojima et al. | Sep 2003 | A1 |
20030206559 | Trackewsky et al. | Nov 2003 | A1 |
20050018754 | Song | Jan 2005 | A1 |
Number | Date | Country |
---|---|---|
0 307 962 | Mar 1989 | EP |
0 817 399 | Jan 1998 | EP |
0 825 794 | Feb 1998 | EP |
0 817 399 | Jul 1998 | EP |
0 825 794 | Jan 2000 | EP |
0 307 962 | May 2000 | EP |
WO 9107030 | May 1991 | WO |
WO 9523461 | Aug 1995 | WO |
WO 9721294 | Jun 1997 | WO |
WO 9827670 | Jun 1998 | WO |
Number | Date | Country | |
---|---|---|---|
20020131398 A1 | Sep 2002 | US |