A Specification-Compatible Bluetooth Inquiry Simplification - CiteSeerX

0 downloads 0 Views 294KB Size Report
frequency slots in the 2.4 GHz band (23 in some countries). The master of a ... Background. In this section, we review the Bluetooth inquiry process. Each ... and collects information used to induct devices into the piconet. Proceedings of the ...
Proceedings of the 37th Hawaii International Conference on System Sciences - 2004

A Specification-Compatible Bluetooth Inquiry Simplification Brian S. Peterson, Rusty O. Baldwin, and Jeffrey P. Kharoufeh United States Air Force Institute of Technology [email protected], [email protected], [email protected] performance while maintaining compatibility with devices that adhere to the standard.

Abstract We identify and analyze a specification-compatible method for implementing the Bluetooth inquiry function that simplifies the design while reducing the mean inquiry time. Using simulation data and independent empirical measurements, we verify a previously derived probability density function for the inquiry time of a Bluetooth device. Although the derived density matches the simulated data, it does not closely match the measured data. Assuming the manufacturer made a logical simplification to the specification, we derive the probability density function using the simplification and show it matches the empirical data. In addition to simplifying the inquiry substate implementation, the inquiry modification performs better than the specified inquiry process. We also present a simple method to mitigate a noisy channel.

1. Introduction

B

LUETOOTH is a low-power, open standard for implementing Personal Area Networks (PAN) [1]. It uses a slow hop frequency hopping spread spectrum scheme with 79 1-MHz frequency slots in the 2.4 GHz band (23 in some countries). The master of a Bluetooth piconet coordinates time-division duplex transmissions of up to seven active slaves by alternating between master and slave transmissions in 625 µs time slots. A Bluetooth device has two major states, standby and connection, and seven substates. Substates are used to incorporate a device as a slave to the piconet and transfer the master’s counter/address values. The master collects slaves by entering the inquiry substate to discover neighboring devices. The master device uses the page substate to induct new devices into the piconet as slaves. The Bluetooth standard [1] recommends a device remain in the inquiry substate for 10.24 s. Analytical analysis of the inquiry time probability density function (pdf) shows that 99% of devices can be discovered in 5.12 s over an ideal channel [2]. We simulate this inquiry process and verify the probability distribution with the derived distribution. Additionally, we compare both distributions to an empirical inquiry time probability distribution collected from Bluetooth devices [3]. While the simulation matches the analytical pdf, it is clear the tested Bluetooth devices do not strictly adhere to the specification. We speculate that some implementations have simplified the train change in the inquiry substate to improve

2. Background In this section, we review the Bluetooth inquiry process. Each Bluetooth device has a 28-bit free-running counter (CLK) and unique 48-bit address. The master of a piconet uses its counter and address to generate the hop pattern that all piconet members follow. To be a slave member of a piconet, a master must transmit its counter and address values to a device and assign the device a 3-bit address. The slave device uses the master’s address/clock values to generate the hop pattern followed by the entire piconet. Link controller substates are used to transfer the master’s address/clock values to the slave. A node enters the inquiry substate when it is searching for other nodes to form a piconet; the inquiring node acts as the master. If a node is in the inquiry scan substate, it is searching for a piconet to join and the scanning node will act as a slave. An inquiring node transmits inquiry packets frequently while a scanning node changes frequencies at a slower rate allowing the two devices to find each other relatively quickly. This process is described in more detail below. A device in inquiry mode transmits inquiry packets on two pseudo-random frequencies during a normal packet time slot as shown in step 1 of Figure 1. The inquiring device waits for a response 625 µs later on the same frequencies. To receive an inquiry packet, a prospective slave device must be receiving in the inquiry scan substate on the same frequency used for an inquiry packet. To account for the randomness of the hop sequence, the scanning device only changes frequency every 1.28 seconds. When an inquiry packet is received, the scanning device drops out of scan mode for an integer number of time slots uniformly distributed between 0 and 1023 which corresponds to a back-off time of 0 to 639.375 ms. This delay (step 2 in Figure 1) minimizes collisions between multiple devices receiving the same inquiry packet. After the back-off time elapses, the device returns to scan mode. After receiving a second inquiry packet (step 3), the scanning device waits 625 µs and returns an FHS packet to the master (step 4). The FHS packet contains the address and counter values of the slave device. In step 5, the inquiring device may continue transmitting packets for the duration of the inquiry substate to find other neighboring devices or jump immediately to page the slave found. Thus, the inquiring device discovers neighboring devices and collects information used to induct devices into the piconet.

0-7695-2056-1/04 $17.00 (C) 2004 IEEE

1

Proceedings of the 37th Hawaii International Conference on System Sciences - 2004

First Frequency

Time

VWHS

VWHS

VWHS

I N I N

0$67(5

0$67(5

I N[ I N[

Iಬ N[

6/$9(

12

%$&. %$&.2)))$&725



25

 



 

 











 

 



 







 







 









 















 





7R3DJH 6FDQ

25



VWHS

12

6/$9(

)LQLVK ,QTXLU\

)+6

5(63216(    

I N[

InquiryProcess

,148,5
1.26875 as shown in Figure 5. Since a device in the inquiry scan mode is assumed to be scanning before t = 0, a scan window begins prior to, but yet overlaps, t = 0 when the transmission of inquiry packets begins, allowing an inquiry packet to be received before TR .

0-7695-2056-1/04 $17.00 (C) 2004 IEEE

2

Proceedings of the 37th Hawaii International Conference on System Sciences - 2004

Time 53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

0

1

2

3

4

5

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

0

1

2

3

4

5

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

0

1

2

3

4

5

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

0

1

2

3

4

5

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

0

1

2

3

4

5

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

0

1

2

3

4

5

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

0

1

2

3

4

5

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

0

1

2

3

4

5

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

0

1

2

3

4

5

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

0

1

2

3

4

5

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

0

1

2

3

4

5

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

0

1

2

3

4

5

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

0

1

2

3

4

5

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

0

1

2

3

4

5

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

0

1

2

3

4

5

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

0

1

2

3

4

5

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

0

1

2

3

4

5

SameTrain

Re-ordered Frequencies

Fig. 4.

Random Inquiry Scan frequency

A-train B-train

63

71

55

TI = TF + TB + 1.28N2 .

1

64

75

56

77

61

69

53

78

62

TR = 1.27625 s 70

54

0



61

69

53

78

(Scan freq= 71)

=

70

54

0

63

71

4 5  

fTI (t|EHi ∩ {N2 = j}) ×

i=1 j=0 55

1

64

P ({N2 = j}|EHi )P (EHi )

75

Scan Window (Scan freq= 55)

DeviceScan Window began prior to t = 0

fTI (t)

t = 1.28 s 62

(1)

Define the event EHi as the event that the first inquiry packet was received in the ith 1.28 s interval of the inquiring process, where i ∈ {1, 2, 3, 4, 5}. Since the first inquiry packet can only be received once, EHi only occurs for a single value of i. The pdf of TI can be written using Bayes’ rule as [2]

Inquiry scan frequency remaining in a train.

t = 0 s (inquiry transmission by master begins) 0

number of unsuccessful attempts before receipt of the second inquiry packet after the back-off time has elapsed. Since T2 is not uniformly distributed, a pdf for the inquiry time including T2 is complicated. Assuming T2 = 0 simplifies the model with little loss in accuracy. The maximum error this introduces into the model is 11.25 ms in a system with a mean inquiry time on the order of seconds. The inquiry time, TI , then, is the random sum:

Indicates when packet was received

Fig. 5. The event that the first inquiry packet is received prior to TR .

(2)

and is shown in Figure 6. The conditional pdfs and probabilities used in (2) are developed in [2]. 0.4 0.4

1 .10 -4 1·10 4

0.3 0.3

fTI(t)

0s 1.28 s 2.56 s 3.84 s 5.12 s 6.40 s 7.68 s 8.96 s 10.24 s 11.52 s 12.80 s 14.08 s 15.36 s 16.64 s 17.92 s 19.20 s 20.48 s

-5 5 5·10 5 .10

0.2 0.2

If the scanning frequency is in the inquiry train, the scanning device receives an initial inquiry packet in a time distributed on (0, 11.25) ms, depending on the position of the scan frequency within the train. Let this random variable be T1 . Since the inquiry packets are sent in sets of two with a pause for responses in between sets, T1 is not uniformly distributed. If the scanning frequency is not in the train, the scanning device drops out of scan mode but returns exactly 1.28 s after the beginning of the scan window using a different scan frequency. We define the random variable N1 as the number of unsuccessful scan attempts before receipt of the first inquiry packet. Each time the scanning device returns to scan mode, the trains will have either swapped a frequency, or the inquiring device may have switched the train it is transmitting on. Let TF be the time the first inquiry packet is received by the scanning device. One might expect that TF = TR +T1 +1.28N1 . However, recall that packets may be received prior to TR if TR > 1.26875 s. Thus, the pdf for TF is not a simple convolution of the probability densities of TR , T1 , and 1.28N1 . Once an initial packet has been received at TF , the scanning device drops out of the inquiry scan substate for a time TB , a discrete random variable whose sample space consists of 1024 values spaced every 625 µs between at t = 0 and t = 639.375 ms. Once the back-off time has elapsed, the inquiry is completed in a time, T2 , discretely distributed on (0, 11.25) ms if the scanning frequency is in the current train. The random variable T2 is not uniformly distributed due to the transmission pattern of an inquiring device. Due to TB and the possibility of scan frequency and train changes, T2 may not be equivalent to T1 as is sometimes assumed [3][4][5]. Moreover, the scanning frequency may not be in the correct train after the back-off. Thus, we define the random variable N2 as the

00

0.1 0.1 00 00

11

22

33 Time (s)

44

22

33

55

44

66

Analytic pdf

55

77

66

77

88

88

99

99

1010

Simulated mean pdf

Fig. 6. Inquiry time (TI ) pdf using Bluetooth specification.

3. Simulation The pdf of (2) is used to validate a Matlab simulation. The simulation was written to emulate a device measurement experiment which characterized the density of inquiry time between two Bluetooth devices [3] one meter apart. Inquiry time data was collected for a device that remained in the inquiry scan substate. Another device entered the inquiry substate for 12.8 seconds and recorded the time the scanning device was discovered. The inquiring device then entered the standby state for a time uniformly distributed on (0, 12.8) seconds to in an attempt to remove “synchronization artifacts” and then re-entered the inquiry substate. This process was repeated 1500 times. Our simulation repeated the experiment 4,000 times. Since each replication of the experiment produced a different inquiry time pdf based on the relationship between the clock/addresses of the devices involved, the simulation yielded an mean pdf shown in Figure 6. The difference between the analytical and simulated mean density is shown in Figure 7. The simulation data are compared to the measurement results from [3] shown in Figure 8. The relationship between scan frequency changes and train membership changes remain constant through the 1500 replications of the experiment; they both change every 1.28 s and

0-7695-2056-1/04 $17.00 (C) 2004 IEEE

3

Proceedings of the 37th Hawaii International Conference on System Sciences - 2004

|Analytic f (t)- Simulated f (t)|

TI TI |Derived fTI(t) -Simulated fTI(t)|

0.010 0.008 0.008

0.006 0.006

0.004 0.004

0.002 0.002

0 0 0

0

1

2

1

3

2

4

3

5

4

6

5

7

6

7

Time (s) Fig. 7. Difference in fTI (t) between derived and simulated mean pdf using specified inquiry process. 0.4 0.4

1.0

0.2 0.2

Analytical density Measured density

0.75

Analytical CDF Measured CDF

0.5

0.1 0.1 00 00

FTI(t)

fTI(t)

0.3 0.3

0.25

0.5

11

1.5

22

2.5

33

Time (s)

3.5

44

4.5

55

5.5

66

driven inquiry since it is possible the train in use (A or B) also changes during any scan window. To simplify the situation, we assume the train membership changes do not occur during the scan window. This introduces an error of 0.88% (11.25 ms/1.28 s) into the pdf but simplifies the density function significantly. Additionally, we will assume when EHi occurs, the reception time of the first inquiry packet, TF , is uniform on (i − 1)1.28, 1.28i , i ∈ 1, 2, 3. This introduces an error of 0.042% [2] but simplifies the analysis substantially. To derive the inquiry time pdf, several random events are defined. These events describe relationships between the scan frequency and the inquiry train as well as events that may occur during the back-off period which affect the relationship between the scan frequency and the inquiry train. These events are used to derive the conditional pdfs which are, in turn, used in the inquiry time pdf. The events EM and EL , defined below, describe two fundamental interactions between the scan frequency and the train membership. EM :

the first scan frequency is in the current inquiry train when the first scan window begins. For example, in Figure 9a, EM occurs since the scan frequency is 77; 77 is in the train when the scan window begins. If the scan frequency had been any of the 16 frequencies in the train used when the scan window began, EM is true. In a CLKdriven inquiry implementation, this event does not imply anything about the relation between subsequent scan frequencies and the train since the train in use can change at any point relative to t=0;. The event, EM , is independent of all other events.

EL :

the scan frequency is the frequency which will swap trains at the next membership change. Since the change in the train membership follows the same pattern as the selection of the scan frequency, this event continues throughout the entire inquiry process. For example, suppose frequencies 77 and 2 of Figure 9a are the two frequencies that switch trains at the next membership change. Note that in Figures 9a and b, only the membership of the trains change, not the train being used by the inquiring device. The subsequent scan frequency, and thus the next frequency to leave the train, is 61. By examining 9b, it can be determined that 61 is swapped with 65 by observing that the position once held by 61 in Figure 9a contains 65, just as 77 was replaced by 2. Since this only occurs for one frequency in the train,

6.5

Fig. 8. Measured inquiry time distribution using two Bluetooth devices. [KaL01]

maintain the same relation to one another, regardless of when data collection begins. This makes synchronization artifacts impossible to remove. This relationship can create a large variation in the inquiry time distributions between two devices. Since the analytical pdf is the unconditional density functions for the inquiry time with any random pairing of devices, it is unlikely that the measured pdf between two devices with specific address/clock values closely resembles analytical results. However, the differences between the measured and analytical densities make it clear that the two are not similar even when considering the noise and synchronization artifacts present in the experiment. In the pdf obtained via measurement shown in Figure 8, a large number of sample points lie between t = 1.92 and t = 2.56 seconds. In the analytical and simulated densities, very few devices have an inquiry time between t = 1.92 and t = 2.56 seconds. Given this difference, we theorize that the train of the inquiring device used in the experiment changed based on bit 13 of the inquiring device’s CLK rather than using a separate 2.56 s counter. This simplifies the Bluetooth protocol implementation while retaining compatibility with devices that more strictly follow the standard. We refer to this modified inquiry substate as a CLK-driven inquiry. The remainder of this paper develops and analyzes the inquiry time pdf for a CLK-drive inquiry process.

4. Modified Inquiry Substate Analysis Complex interactions cause special, but unlikely, situations which make the derivation of the inquiry time pdf cumbersome [2]. Two such cases occur when the train membership changes during a scan window or when a scan window overlaps t = 0 s. The interactions are even more complex when using the CLK-

P (EL ) = 1/16.

(3)

The event, EL , is independent of all other events. During the back-off period, the scan frequency generated by the scanning device may change, which we denote as S in the following event definitions. Also, the inquiry train membership may change by itself (T ) or in conjunction with a changing of

0-7695-2056-1/04 $17.00 (C) 2004 IEEE

4

Proceedings of the 37th Hawaii International Conference on System Sciences - 2004

4.1 Probability of EHi , i = 1, 2, 3, 4, 5

tC

Scan Frequency = 77

69 53 78 62 70 54 0 63 71 55 1 64 75 56 77 61 69 53 78 62 70 54 0 63 71 55 1 64 72 56 2 61

First Scan Window

Note: Next Scan Frequency will be 61

a)

With our assumptions

tC

Scan Frequency = 61

P (EH1 ) = P (EM ) = 0.5.

69 53 78 62 70 54 0 63 71 55 1 64 75 56 2 61 69 53 78 62 70 54 0 63 71 55 1 64 72 56 2 65

Second Scan Window

Note: Next Scan Frequency will be 69

b) Frequency changing membership

tC = Start of train with changed membership

Fig. 9. Train membership change subsequent to a scan window.

the inquiry used by the inquiring device (C). When the train used changes, the train memberships also change since they are also tied to the CLK. It is possible for the scan frequency to effectively change trains when the scan frequency changes or the train membership changes if EL also occurs. The possible event combination are: EST C : the scan frequency changes but the train does not change membership during the back-off period, thus the train used by the inquiring device also does not change due to train choice being driven by CLK13 . This is shown in Figure 10a. B-train

A-train

Scan Frequency

Time 1

61

62

63

64

65

66

67

68

69

70

71

72

73

Time 2

61

62

63

64

65

66

67

68

69

70

71

72

73

a)

73

74

75

76

77

78

73

74

75

76

77

78

b)

Fig. 10. Possible events during back-off a) ESTC , when the scan frequency changes but train membership does not and b) EST , when train membership changes but the scan frequency does not. EST :

the train membership and the scan frequency both change during the back-off period but the train used does not change, leaving the scan frequency in the same train as before the back-off period. ESC : the train membership, the scan frequency, and the train used all change during the back-off period. EST C : neither the train membership nor the scan frequency change during the back-off period which implies the train being used also does not change. EST : the train membership changes but neither the scan frequency nor the train used changes during the back-off period. Again, this may effectively result in a train change as shown in Figure 10b. ESC : the train being used changes but the scan frequency does not change during the back-off period. Using the above events, the unconditional and conditional probabilities needed to derive the inquiry time pdf are developed below, beginning with the probability the first inquiry packet is received in the ith 1.28 s interval.

SBO Change

(4)

The scan frequency has a 0.5 probability of being in the first train used by the inquiring device with a random pairing of Bluetooth devices. As mentioned previously, TF |EH1 is uniformly distributed on (0, 1.28) s. The event, EH2 occurs when EM occurs and the train changes between 0 and 1.28 s. Since the time of the first train change, TC , is uniformly distributed on (0, 2.56) s and is independent of the scan frequency’s relationship to the current train, P (EH2 ) = P (EM )P ({0 ≤ TC ≤ 1.28}) = 0.25.

(5)

Likewise, EH3 occurs if the train change occurs between 1.28 and 2.56 seconds, giving P (EH3 ) = P (EM )P ({1.28 ≤ TC ≤ 2.56}) = 0.25.

(6)

The reception time of the first packet given EH2 or EH3 is uniformly distributed on (1.28, 2.56) s and (2.56, 3.84) s, respectively. With our assumptions, EH4 and EH5 cannot occur.

4.2 Conditional Densities for TB Completion Recall that TB is discretely uniform between 0 and 639.375 ms and its sample space contains 1024 points. The pdf of the back-off period completion time, TP , is the convolution of the pdfs for TB and TF –the sum of the two independent random variables. The pdf of TF is dependent on EHi , therefore, the density function of TP must be conditioned on EHi , i = 1, 2, 3. However, TB is independent of EHi . Thus, the conditional pdf for TP is fTP (t|EHi ) = fTB (t) ∗ fTF (t|EHi ).

(7)

The inquiry time is dependent on events EST C , EST C , EST , ESC , EST , and ESC which are further dependent on TB . As TB gets larger, the probability of EST C decreases. Therefore, we condition fTP on these events as well with  fTP (t|EHi ) = fTP (t|EHi ∩ EX )P (EX |EHi )P (EHi ) (8) X

where X ∈ {ST C, ST C, ST , SC, ST , SC} and i = 1, 2, 3. These conditional probabilities and probability densities are defined below. Recall that the scan frequency is based on the free running counter of the scanning device. Therefore, the time until a change in scan frequency is distributed continuously uniform on (0, 1.28) s and is denoted as SS . Note that this time is not dependent on the beginning of the scan window, but rather represents when the frequency generating subsystem changes the current scan frequency. Likewise, the time until the next membership change in the train, denoted as ST , is distributed uniformly on (0, 1.28) s.

0-7695-2056-1/04 $17.00 (C) 2004 IEEE

5

Proceedings of the 37th Hawaii International Conference on System Sciences - 2004

Thus, the cumulative distribution functions (cdf) of SS and ST , FS (t) and FT (t) respectively, are  t TB }),

(12)

P (EST C |EHi ) = P ({SS > TB } ∩ {ST > TB }),

(13)

P (ESC |EH1 ) P (ESC |EH1 )

= P (EST |EH1 ) = 0.5P ({SS ≤ TB } ∩ {ST ≤ TB }), (14) = P (EST |EH1 )

=

0.5P ({SS > TB } ∩ {ST ≤ TB }), (15)

P (ESC |EH2 ) = P (ESC |EH3 ) = 0,

(16)

P (ESC |EH2 ) = P (ESC |EH3 ) = 0.

(17)

and The mutual independence of SS and ST results in P (EST C |EHi )

=

1023   1  FS (nTslot ) 1 − FT (nTslot ) (18) 1024 n=0

1 − P (EC |EHi ) × 1024 1023   1 − FS (nTslot ) FT (nTslot ).

P (EST |EHi ) =

fTB (t|EST C ∩ EH1 ) =

≤ TB } ∩ {ST > TB }|EH1 ) P (EST C |EH1 )    δ(t − nTslot )  FS (nTslot ) 1 − FT (nTslot )  = 1024 P (EST C |EH1 ) =

1 − P (EC |EHi ) P (EST |EHi ) = × 1024 1023  FS (nTslot )FT (nTslot ), n=0

(19)

(20)

d dt P ({SS

(22)

for n = 0, 1, 2, ...1023 and, fTP (t|EST C ∩ EH1 ) =  t  1  fTB (τ |EST C )dτ 0 < t ≤ 639.375ms   1.28  0   1 639.375ms < t ≤ 1.28s 1.28  t−1.28 =  1   1.28 1 − fTB (τ |EST C )dτ    0  1.28 < t ≤ 1.9139375s = fTF (t|EH1 ) ∗ fTB (t|EST C ∩ EH1 )

(23)

where δ(t) is the impulse function. The probability P (EST C |EH1 ) is used in (22) since the probability distribution for TB |EST C , is the same is the same for all EHi , i = 1, 2, 3. The same is true for all EX , X ∈ {ST C, ST C, ST , SC, ST , SC}, except when E cannot occur. In those instances where EX cannot occur, fTB (t|EX ) is zero for all time. However, those terms will be driven to zero in the overall expression (2) by the probability of the events occurring. Thus, for brevity, TB |EX is assumed independent of EHi . Therefore, fTB (t|EST C ) =

   δ(t − nTslot ) 1 − FS (nTslot ) 1 − FT (nTslot ) , (24) 1024 P (EST C |EH1 )

where Tslot is the duration of one Bluetooth time slot, 625µs. Similarly, P (EST C |EHi ) = 1023   1  1 − FS (nTslot ) 1 − FT (nTslot ) , 1024 n=0

(21)

n=0

fTB (t|EST ) = fTB (t|ESC ) = δ(t − nTslot ) (FS (nTslot )) (FT (nTslot )) , = 1024 P (EST |EH1 )

(25)

and fTB (t|EST ) = fTB (t|ESC ) =   δ(t − nTslot ) 1 − FS (nTslot ) FT (nTslot ) = 1024 P (EST |EH1 )

(26)

for n = 0, 1, 2, ...1023.

0-7695-2056-1/04 $17.00 (C) 2004 IEEE

6

Proceedings of the 37th Hawaii International Conference on System Sciences - 2004

The densities for TP when EST C , EST , ESC , EST , and ESC occur are determined by replacing EST C in (23) with EST C , EST , ESC , EST , and ESC , respectively as well as shifting the distribution appropriately in time. Since TF |EHi , i = 2, 3 are distributed identically to TF |EH1 but are time shifted by 1.28(i − 1) s, fTP (t|EX ∩ EHi ) = fTP (t − 1.28(i − 1)|EX ∩ EH1 ) (27)

 P (E )P (E )  L H1 × fTI (t|EH1 ∩ {N2 = 1}) = P (EH1 ∩ {N2 = 1})  0.5fTP (t − 1.28|EST C )P (EST C |EH1 ) +  fTP (t − 1.28|EST )P (EST |EH1 ) , (31) and

for X ∈ {ST C, ST C, ST , SC, ST , SC}. For example,

  P (EH1 ) fTI (t|EH1 ∩ {N2 = 2}) = × P (EH1 ∩ {N2 = 0})  0.5fTP (t − 2.56|EST C )P (EST C |EH1 )P (EL ) +

fT (t|EST C ∩ EH3 ) = P t−2.56s  1  fTB (τ |EST C )dτ   1.28  0    2.56 < t ≤ 3.199375s  1 3.199375 < t ≤ 3.84s 1.28

 t−3.84s    1   1 − f (τ |E )dτ T  B ST C 1.28   0  3.84 < t ≤ 4.479375s

fTP (t − 2.56|ESC )P (ESC |EH1 ) +

 fTP (t − 2.56|ESC )P (ESC |EH1 )P (EL )

(32)

where P (EH1 ∩ {N2 = 0}) = P (EH1 ) ×  P (ESC |EH1 )P (EL ) +

(28)

P (EST C |EH1 ) + P (EST C |EH1 )P (EL ) +  P (EST |EH1 ) + P (EST |EH1 )P (EL ) ,

4.3 Conditional Densities for the Inquiry Time

(33)

The inquiry time is dependent on N2 such that T I = T P + N2 .

(29)

The random integer N2 is dependent on the relationship between the train and the scan frequency which is a function of the event EHi , i = 1, 2, 3. If EH1 occurs, the second packet is received during the first scan window after completion of the back-off period (i.e., N2 = 0) unless the scan frequency changes such that it is no longer in the train being used or the train changes such that the scan frequency no longer resides in it. If EST ∩ EL ∩ EH1 occurs, N2 = 1 since the train membership change causes the scan frequency to be outside the train during the first scan window after the back-off period. Between the first and second window, however, it is known that the inquiring device will change trains. Likewise, if EST C ∩ EL ∩ EH1 occurs, N2 = 1 if the train membership change also includes a train change between the first and second windows. This happens with probability 0.5. Otherwise, N2 = 2. Finally, N2 = 2 if ESC ∩ EH1 or ESC ∩ EL ∩ EH1 occurs. The train changes such that the scan frequency is no longer in the train and does not fall within the train again until the train change between the second and third windows. This yields   1 fTI (t|EH1 ∩ {N2 = 0}) = × P (EH1 ∩ {N2 = 0})  fTP (t|EST C )P (EST C |EH1 )P (EH1 ) +

P (EH1 ∩ {N2 = 1}) = P (EH1 )P (EL ) ×   0.5P (EST C |EH1 ) + P (EST |EH1 ) , and P (EH1 ∩ {N2 = 2}) = P (EH1 ) ×  P (ESC |EH1 )P (EL ) +

 0.5P (EST C |EH1 )P (EL ) + P (ESC |EH1 ) . (35)

If EH2 occurs, the situation is different. The train being used cannot change during the back-off period since it changed in the 1.28 s prior to the first packet being received. Likewise, if the train changes membership during the back-off period, the train being used changes between the first and second scan window. Otherwise, the train being used changes between the second and third scan window. Thus,   1 fTI (t|EH2 ∩ {N2 = 0}) = × P (EH2 ∩ {N2 = 0})  fTP (t − 1.28|EST C )P (EST C |EH2 )P (EH2 ) + fTP (t − 1.28|EST C )P (EST C |EH2 )P (EL )P (EH2 ) + fTP (t − 1.28|EST )P (EST |EH2 )P (EH2 ) +  fTP (t − 1.28|EST )P (EST |EH2 )P (EL )P (EH2 ) , (36)

fTP (t|EST C )P (EST C |EH1 )P (EL )P (EH1 ) + fTP (t|EST )P (EST |EH1 )P (EH1 ) + fTP (t|EST )P (EST |EH1 )P (EL )P (EH1 ) +  fTP (t|ESC )P (ESC |EH1 )P (EL )P (EH1 ) ,

(34)

fTI (t|EH2 ∩ {N2 = 1}) = fTP (t − 2.56|EST ),

(37)

fTI (t|EH1 ∩ {N2 = 2}) = fTP (t − 2.56|EST C )

(38)

and (30)

0-7695-2056-1/04 $17.00 (C) 2004 IEEE

7

Proceedings of the 37th Hawaii International Conference on System Sciences - 2004

P (EH2 ∩ {N2 = 0}) = P (EH2 ) ×  P (EST C |EH2 ) + P (ES T C |EH2 )P (EL ) +  P (EST |EH2 ) + P (EST |EH2 )P (EL ) ,

(39)

P (EH2 ∩ N2 = 1) = P (EST |EH2 )P (EL )P (EH2 ),

(40)

for j = 0, 1, 2. Substituting all required probabilities and conditional probabilities into densities (2) 4  5 

fTI (t|EHi ∩ {N2 = j}) ×

i=1 j=0

P ({N2 = j}|EHi )P (EHi ).

0.001 0.001

00 0 0

11

22

33

44

55

(43)

The resultant density can be determined and is shown in Figure 11. The simulation model was modified to change inquiry trains when the inquiring device’s CLK13 bit changed, producing the pdf also shown in Figure 11. The simulation was replicated 4,000 times with 1500 inquiries per replication and random address/clock values for each replication. The difference between the analytical and simulated mean density is shown in Figure 12. 0.4 0.4

77

88

0.05 level for either the Kolmogorov-Smirnov (KS = 0.909, Critical = 1.358) or Cram´er-von Mises (CV = 0.08, Critical = 0.461) tests. However, the tests are somewhat contrived since the derived distribution is not conditioned upon the address/clock values for the device pairs whereas the measured distribution is conditioned on a specific address/clock pair. Although not precisely matching the derived cdf, the measured cdf lies well within the range of cdfs generated by the simulation as seen in Figure 13. Since the measured experiment represents a single replication of the experiment from which the simulated distributions were derived, it is likely that the measured devices used the CLK-driven inquiry process.

Derived density

0.3 0.3

Derived cdf Measured cdf Simulated cdfs

fTI(t)

Simulated mean density

0.2 0.2

0.1 0.1 00 0 0

66

Inquiry Time cdf

fTI (t|EH3 ∩{N2 = j}) = fTI (t−1.28|EH2 ∩{N2 = j}) (42)

=

0.002 0.002

(41)

Since the conditions under which EH3 occurs are identical to those under which EH2 occurs (except for a 1.28 s time shift),

fTI (t)

0.003 0.003

Time (s) Fig. 12. Difference in fTI (t) between derived and simulated mean pdfs using CLK-driven inquiry.

and P (EH2 ∩ N2 = 0) = P (ES T C |EH1 )P (EL )P (EH2 ).

|Derived f (t)- Simulated f (t)|

where

TI I |Derived fTIT(t) -Simulated fTI(t)|

0.004

0.5

1

1

1.5

2

2

2.5

3

3

3.5

4

4

4.5

5

5

5.5

6

6

6.5

7

7

Inquiry Time (s)

Time (s)

Fig. 11. Inquiry time pdf, fTI (t), using the CLK-driven inquiry.

Fig. 13. Measured inquiry times compared to derived and simulated inquiry times using the CLK-driven inquiry substate.

5. Results

Minimizing the inquiry time is important for several reasons. The inquiry substate uses twice as much power as the connection state [3]. Remaining in the inquiry state longer than necessary reduces the potential to be in the connection state and, therefore, network throughput. Additionally, nodes in the inquiry state can cause significant interference to the neighboring piconets [6]. The CLK-driven process simplifies the implementation while maintaining compatibility with devices more strictly adhering to the standard. The time spent in the inquiry substate must be a multiple of 1.28 s [1]. Using the

The simulated mean inquiry time using the CLK-driven inquiry is 2.112 s compared to 2.292 s using the inquiry substate as specified in the standard [1]. The mean inquiry time for the measured devices is 2.221 s [3]. The measured distribution closely matches the derived distribution until t = 3 s, after which it diverges slightly. However, the null hypothesis that the measured distribution is statistically equivalent to the derived distribution is not rejected at the

0-7695-2056-1/04 $17.00 (C) 2004 IEEE

8

Proceedings of the 37th Hawaii International Conference on System Sciences - 2004

specification and an inquiry state duration of 5.12 seconds (half of that recommended in the specification), 99.0% of the packets are received assuming a perfect channel [2]. By comparison, 99.6% of the packets are received in 5.12 s using the CLKdriven inquiry substate. Thus, an inquiry duration of 5.12 s is sufficient using the inquiry process in the standard [2] but is more successful when using the CLK-driven inquiry. However, the most important advantage of the CLK-driven inquiry is that it eliminates the need for a separate counter, register, and supporting algorithm to control train use. No hardware/software is needed for train selection since it is controlled by a CLK bit. Although the empirical inquiry data was not collected from a perfect channel, it is unlikely that noise had a significant impact on the inquiry time since the two devices were only one meter apart. However, if a noisy environment is detected, noise effects can be countered by increasing the scan window length. By doubling the scan window length, the inquiry time distribution remains almost identical. Since the train is simply repeated 128 times between membership changes, it allows a scanning node a second opportunity to receive the inquiry packet if receipt of the first transmission is disrupted by noise. If the noise is due to packets from other piconets being transmitted on the same frequency or sporadic background noise, the noise may not be present at the second attempt to receive the inquiry packet. This delays packet reception by only 10 ms in a distribution spread across multiple seconds. This almost doubles the time that a scanning node spends in scan windows, from 0.88% to 1.66%, but has a relatively small impact on node throughput.

[4] T. Salonidis, P. Bhagwat, , and L. Tassiulas, “Proximity awareness and fast connection establishment in Bluetooth,” in Proceedings of the First Annual ACM Workshop on Mobile and Ad Hoc Networking and Computing 2000, Boston, Massachusetts, pp. 141-142, Aug 2000. [5] T. Salonidis, P. Bhagwat, L. Tassiulas, and R. LaMaire, “Distributed Topology Construction of Bluetooth Personal Area Networks,” in Proceedings of IEEE INFOCOM 2001, Anchorage, Alaska,Vol. 3 , pp. 22-26 Apr 2001. [6] B. Peterson, R. Baldwin, and R. Raines, “Inquiry Packet Interference in Bluetooth Scatternets,” submitted to ACM Mobile Computing and Communications Review.

6. Conclusion The Bluetooth inquiry time density function is the result of a complex and dynamic relationship between the inquiry train and the scan frequency of devices in the inquiry scan substate. The simulated mean pdf for inquiry time closely matches that derived in [2] for the inquiry time when the specification is followed. However, it is evident from experimental data that some implementations do not strictly adhere to the specification. By using the thirteenth CLK bit to determine the inquiry train being used, the inquiry substate implementation can be simplified while retaining compatibility with the specification and reducing actual inquiry time. Although the apparent use by the measured devices shows the CLK-driven inquiry is not a new idea, the probability distribution for its inquiry time gives insight into the effects of the change. The simulated and analytical inquiry time densities for the CLK-driven inquiry closely follow the probability density for the collected data.

References [1] Specif ication of the Bluetooth system, Core Version 1.1, Bluetooth SIG, 2001. [Online]. Available: http://www.bluetooth.com/ [2] B. Peterson, R. Baldwin, and J. Kharoufeh, “Bluetooth Inquiry Time Characterization and Selection,” submitted to IEEE Transactions on Mobile Computing. [3] O. Kasten and M. Langheinrich, “First Experiences With Bluetooth in the Smart-Its Distributed Sensor Network,” in Proceedings of the International Conference on Parallel Architectures and Compilation Techniques, 2001, Sept. 2001.

0-7695-2056-1/04 $17.00 (C) 2004 IEEE

9

Suggest Documents