2286
IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 62, NO. 8, AUGUST 2013
Timestamping of IEEE 802.15.4a CSS Signals for Wireless Ranging and Time Synchronization Chiara Maria De Dominicis, Student Member, IEEE, Paolo Pivato, Member, IEEE, Paolo Ferrari, Member, IEEE, David Macii, Member, IEEE, Emiliano Sisinni, Member, IEEE, and Alessandra Flammini, Member, IEEE
Abstract—Accurate positioning and distributed time synchronization for short-range personal area networks (PAN) are expected to boost the impact of mobile wireless systems in a variety of applications. At the moment, wireless ranging and time synchronization are often addressed independently. The two main underlying reasons are: 1) the different accuracy requirements for time-of-arrival measurements and local clock correction and 2) the intrinsic difficulty to timestamp the received radio frames with uncertainty lower than some nanoseconds due to the joint effect of clock resolution, wideband noise, clock frequency offsets, and multipath propagation. Of course, if the influence of such phenomena were minimized, time synchronization could benefit from accurate one-way ranging and vice versa. One of the most recent and promising communication schemes to reach this goal is chirp spread spectrum (CSS) modulation. Indeed, this is also one of the alternative physical (PHY) layers for PANs recommended in the amendment IEEE 802.15.4a-2007, recently included in the standard IEEE 802.15.4-2011. In this paper, the features of IEEE 802.15.4a CSS signals for low-level timestamping are analyzed both theoretically and through simulations under the effect of various uncertainty contributions. Accordingly, an effective solution for frame timestamping at the symbol level is proposed. Some experimental results based on a software defined radio implementation of the IEEE 802.15.4a PHY layer confirm that CSS can be successfully adopted both for time synchronization and ranging. Index Terms—Chirp modulation, radio distance measurement, synchronization, timing jitter, uncertainty.
I. Introduction HE DIFFUSION of measurement and control solutions based on distributed wireless embedded platforms requires that networked systems are synchronized to a common timescale (either global or local) to ensure task coordination
T
Manuscript received July 07, 2012; revised November 13, 2012; accepted December 10, 2012. Date of publication June 5, 2013; date of current version July 10, 2013. The work was supported in part by the PRIN 2008 Project, “Methodologies and measurement techniques for spatio-temporal localization in wireless sensor networks,” under Grant 2008TK5B55, and the PRIN 2009 Project “New generation hybrid networks in measurement and industrial automation applications—Characterization and wired/wireless performance measurement,” under Grant 2009ZTT5N4. The Associate Editor coordinating the review process was Dr. Deniz Gurkan. C. M. De Dominicis, P. Ferrari, E. Sissinni, and A. Flammini are with the Dipartimento di Ingegneria dell’Informazione, University of Brescia, Brescia 25100. Italy (e-mail:
[email protected]; paolo.
[email protected];
[email protected]; alessandra.flammini@ing. unibs.it) P. Pivato is with the Dipartimento di Ingegneria e Scienza dell’Informazione, University of Trento, Trento 38121, Italy (e-mail:
[email protected]). D. Macii is with the Dipartimento di Ingegneria Industriale, University of Trento, Trento 38121, Italy (e-mail:
[email protected]). Color versions of one or more of the figures in this paper are available online at http://ieeexplore.ieee.org. Digital Object Identifier 10.1109/TIM.2013.2255988
[1], data aggregation and fusion [2], as well as energy-efficient duty cycling [3]. Such problems are even more critical if the network topology is supposed to change, e.g., when systems are located on moving objects or worn by people. In addition, event detection is often useless without some information on when and where this event occurs. As a consequence, in the last years several techniques for time synchronization and localization have been developed for wireless sensor networks (WSNs) [4], [5]. Generally, these measurement problems are analyzed and addressed independently. However, some researchers have recently pointed out that they are closely related [6]. Therefore, they can be potentially addressed using a joint approach, although the uncertainty sources of one problem can seriously influence the other [7]. In fact, if the localization of a wireless node relies on the measurement of temporal quantities, such as the round trip time (RTT), the message time-of-arrival (TOA) or the time difference of arrival (TDOA) of subsequent frames [8], then any uncertainty contribution in the time domain will certainly affect the estimated distance between pairs of network nodes. On the other hand, the lower bound to time synchronization uncertainty depends on the internode communication latency (which also depends on node distance), if this is not properly estimated and compensated. The conceptual element of contact between time synchronization and wireless time-based ranging is represented by frame timestamping, namely, the technique used to record the moment when a frame is either sent or received. It is worth emphasizing that the timestamping accuracy requirements for time synchronization and ranging are generally quite different. Time synchronization implies that time is continuously measured by every node of the network by means of a free-running counter or clock starting from a common epoch. This is essential in distributed measurement systems [9]. Timestamping accuracy is generally not very strict at the application layer, since differences in the order of a few ms are typically adequate for distributed monitoring tasks or sensor data aggregation. Sometimes synchronization uncertainty has to be so low as a few microseconds, e.g., when a time-division multiple access (TDMA) communication scheme has to be used. In such cases, media access control (MAC) timestamping is usually reasonably accurate for such purposes. This is quite common for instance in WSNs relying on specific protocols, such as the Flooding Time Synchronization Protocol (FTSP) [10], Tiny-Sync/Mini-Sync [11], and Average TimeSynch (ATS) [12]. However, if timestamps are
c 2013 IEEE 0018-9456/$31.00
DE DOMINICIS et al.: TIMESTAMPING OF IEEE 802.15.4a CSS SIGNALS FOR WIRELESS RANGING AND TIME SYNCHRONIZATION
collected as soon as the start frame delimiter (SFD) field of an incoming packet is received, uncertainty can be reduced down to 1 or 2 μs [13]. Timestamp values can be used for synchronization in two alternative ways. Either they are mapped from the local to the common network timescale a posteriori, i.e., on the basis of the previously estimated time and frequency offsets between pairs of nodes [14] or they are used to discipline the tick rate of each local clock through a suitable controller, usually referred to as a servo clock. This approach is adopted also by the well-known precision time protocol (PTP), [15], which is becoming increasingly popular even for wireless networks [16]–[18]. In the case of wireless ranging, the situation is completely different since the TOA of a radio message over a shortrange link is in the order of some ns. The simplest and most effective approach to estimate the TOA is to use a start-stop timer or a time-to-digital converter (TDC) with sub-nanosecond resolution measuring the RTT between every device and its nearby partner nodes. Each timer or TDC is reset and triggered just before a node sends a new message to its partner and it is stopped as soon as the acknowledgment (ACK) message is received [19]. Accordingly, the TOA and the distance between nodes can be estimated by dividing the measured RTT value by 2 after the time spent to encode and to decode frames is removed at both ends. RTT measurement uncertainty can be reduced by timestamping any sent or received frames at the lowest possible level, i.e., when the first bit or the first symbol of a frame are sent or detected by the front-end of the radio transceiver. Of course, time synchronization is neither required, nor possible with the two-way approach, since the measurement results refer to independent time intervals. However, if nodes were synchronized within a few ns, both TOA and node distance values could be easily estimated with a one-way approach, namely, from the difference of the timestamps collected by different nodes after the frequency skew between them is compensated. This approach requires in any case both local clocks with a (sub)-nanosecond resolution and physical PHY-layer timestamping. An additional key element affecting accuracy is the robustness of the adopted radio communication scheme to typical radio-frequency vagaries, such as multipath fading and interferences. For instance, it is known that the PHY-layer timestamping jitter can be greatly reduced when ultrawide band (UWB) pulses are used [20]–[22]. Unfortunately, UWB transmitters tend to dissipate a larger amount of energy for a given transmission range. This is the main reason why they are not commonly used in WSNs, despite a UWB PHY layer (explicitly conceived for ranging purposes) has been included in the amendment IEEE 802.15.4a-2007 for personal area networks (PANs) [23], recently included also in the last edition of the standard IEEE 802.15.4-2011 [24]. The same documents also describe another alternative physical layer based on chirp spread spectrum (CSS). Such a scheme is to be preferred in scenarios where nodes have a high mobility. Also, it has been successfully used both for ranging [25], [26], and time synchronization [27], although a clear analysis of CSS-based timestamping is not available in the literature yet.
2287
In this paper, after a short summary about the main features of the IEEE 802.15.4-2011 CSS layer (in Section II), the basic CSS signal detection problem in ideal conditions is discussed in Section III. The underlying theoretical framework justifies and extends the validity of the experimental results presented in [27] and [28]. In Section IV the effect of various uncertainty contributions on CSS signal detection is analyzed through simulations. Also, an effective frame timestamping policy at the symbol level is proposed to reduce the effect of such contributions. In Section V some experimental results collected using two software defined radio (SDR) platforms are reported. Finally, Section VI concludes the paper. II. Overview of IEEE 802.15.4a Chirp Spread Spectrum As briefly mentioned in Section I, CSS is one the alternative PHY layers for low-rate wireless personal area networks (LRWPANs) recommended in the amendment IEEE 802.15.4a2007 [23], recently included in the standard IEEE 802.15.42011 [24]. The adopted modulation scheme is differential quadrature phase-shift keying (DQPSK) supporting a mandatory data rate of 1 Mb/s and an optional one of 250 kb/s with 8-ary or 64-ary bi-orthogonal coding, respectively. A total of 14 frequency channels is available in the instrumentation scientific medical (ISM) band at 2.4 GHz. The central frequencies of such channels are spaced by 5 MHz from one another. Generally, a chirp waveform is a modulated pulse whose instantaneous frequency changes monotonically as a function of time over an interval of duration Tchirp . Chirp signals are commonly used in radars [29]. A generic complex chirp waveform can be expressed as T T c(t)ejω(t) c(t)ej[2πfc +μ(t)]t − chirp ≤ t ≤ chirp 2 2 s(t) = = 0 0 otherwise (1) where c(t) is the envelope of the signal (e.g., constant if the input signal is modulated in phase), fc is the waveform frequency at time t=0 and μ(t) is the so-called chirp rate, namely, the rate of change of the instantaneous frequency. If μ(t) is constant over time, then the instantaneous frequency is a linear function of t. In this case the chirp signal is referred to as a linear chirp and its bandwidth is B = μTchirp . Generally, linear chirps are called up-chirps when μ >0 (i.e., when the instantaneous frequency grows over time) and downchirps when μ 2 |t| ≤
∼ a1 s˜ k τ − Dk,1 hk (t − = τ) dt μξ 4 k a1 5 Tsub − t − Dk,1 sinc 2 t − Dk,1 Tsub − t − Dk,1 · ejω˜ k (t−Dk,1 ) 0
(t) ∼ yk =
ap s˜ k t − Dk,p + w (t)
p=1
⎧ ⎪ ⎪ 1 ⎪ ⎪ ⎪ ⎨ 1 1 5π 3 Tsub PRC (t) = |t| − + cos ⎪ 2 2 Tsub 5 2 ⎪ ⎪ ⎪ ⎪ ⎩ 0
∼ =
P
(4)
+∞ −∞
− Tsub ≤ t − Dk,1 ≤ Tsub otherwise
(6)
DE DOMINICIS et al.: TIMESTAMPING OF IEEE 802.15.4a CSS SIGNALS FOR WIRELESS RANGING AND TIME SYNCHRONIZATION
2289
TABLE I Subband Center Frequencies fk,m in MHZ ( a ), Chirping Directions ξk,m ( b) and Temporal Parameters ( c) of Different Subchirps for Different Symbol Types as Reported in [23] m\k 1 2 3 4
1 fc − 3.15 fc + 3.15 fc − 3.15 fc + 3.15 m\k 1 2 3 4
2 fc + 3.15 fc − 3.15 fc + 3.15 fc − 3.15 (a) 1 2 +1 +1 +1 −1 −1 −1 −1 +1 (b)
3 fc + 3.15 fc − 3.15 fc + 3.15 fc − 3.15 3 −1 +1 +1 −1
4 fc − 3.15 fc + 3.15 fc − 3.15 fc + 3.15
4 −1 −1 +1 +1
Parameter Tchirp
Value 6 μs
Multiple of 1/32 MHz 192
Tsub τ1 τ2 τ3 τ4
1.1875 μs 468.75 ns 312.5 ns 156.25 ns 0 ns
38 15 10 5 0
(c)
continuous-time matched filter for subchirp of type k. If we assume that: 1) the AWGN is negligible; 2) the Line-of-Sight (LOS) contribution in (5) is much larger than the scattered replicas (i.e., a1 >>ap for p = 2,. . . ,P); the raised cosine function (4) can be approximated by a rectangular window having the same duration Tsub and the same energy as (4). Therefore, after some mathematical steps it results that the signal at the output of the matched filter is given by (6) where ω˜ k = ωk,m − ωc is the center frequency of the kth subchirp after down-conversion. Of course, in the case of direct conversion receivers (DCR) ω˜ k = 0. Observe that the magnitude of (6) is maximum (i.e., equal to 4/5·Tsub ) for t = Dk,1 . Unfortunately, when also (4) is considered in the computation, the analytical expression of the correlation result is too cumbersome to be reported. The two sinc-like pulses in Fig. 2 refer to the theoretical approximate expression (6) (dashed line) and to the numerical results (solid line) obtained including the additional raised cosine window (4), respectively. Clearly, the results are very close within the main lobe (which is the most interesting part), although the amplitude of the simulated correlation peak is about 5% smaller than 4/5·Tsub due to the smooth roll-off of (4). It is worth noticing that the position of the peaks is exactly the same in both cases. Expression (6) suggests that the pulse resulting from subchirp correlation can be effectively used for PHY-layer timestamping on the receiving side. In fact, using this approach the uncertainty contributions introduced by MAC and upper layers are inherently bypassed. Nevertheless, the moment when the peak is detected is generally affected by the following phenomena: 1) incoherent baseband sampling and finite temporal resolution;
Fig. 2. IEEE 802.15.4a subchirp correlation pulse for k=2. The dashed line refers to the theoretical curve given by (6), whereas the solid one results from simulations. The difference between curves is due to the raised cosine (4), but the position of the peaks is the same in both cases.
2) wideband noise; 3) frequency offsets between transmitters and receivers; 4) multipath propagation and fading. Therefore, any timestamp value associated with the detection of a single subchirp can be described by Dk = argmax {yk (t)} + εs + εn + εo + εp
(7)
t∈R
where the random variables εs , εn , εo , and εp refer to the uncertainty contributions due to effect of sampling, noise, frequency offsets, and multipath, respectively. Observe that the p subscript is omitted in the leftmost term of (7), because Dk depends indeed on the superimposition of all replicas. Of course, the probability density function (pdf) of Dk results from the convolution of the pdf of εs , εn , εo , and εp . However, a closed-form expression of the distribution of (7) depends on too many parameters and it is too cumbersome to be useful in practice. For this reason, in the next Section the impact of each uncertainty contribution will be modeled individually and analyzed through simulations. IV. Timestamping uncertainty analysis The influence of each uncertainty contribution defined in Section III has been modeled theoretically and evaluated through numerical simulations. If no otherwise stated, the subchirp simulation parameters refer to the second subchirp (i.e., k = 2) of symbol m = 4. However, the obtained results can be generalized to any other subchirp and symbol type. A. Incoherent Baseband Sampling and Finite Temporal Resolution Since the down-converted CSS waveforms are supposed to be sampled at Fs = 32 MSa/s [23], the correlation defined in (6) is actually implemented in the digital domain. However, waveform sampling is generally incoherent, namely, asynchronous with the input signals. Therefore,
2290
IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 62, NO. 8, AUGUST 2013
the peak of (6) may occur at any time between two consecutive sampling instants. This equivalently means that the uncertainty contribution εs in (7) can be reasonably modeled with a uniform random variable in the range [0,Ts ], with Ts = 1/Fs . The corresponding standard deviation √ is about Ts 2 3 = 9 ns. This value can be reduced through well-known interpolation techniques. In particular, parabolic interpolation offers a good trade-off between accuracy and computational complexity (i.e., suitable for a possible on-chip implementation). Accordingly, the estimated position of the correlation peak results from expression (8) where yk [l] = yk (l · Ts ), and lpeak = argmax {yk [l]} [30]. If sample period fluctuations and l∈Z
additive noise are assumed to be negligible, the residual post-interpolation uncertainty is expected to be much smaller √ than Ts 2 3. Table II reports the post-interpolation errors for 10 given delay values between 0 and Ts . In this way, the peak of the correlation pulse lies exactly in one of ten positions between the two largest samples of the received sampled sequence. In fact, even if the interpolator is applied to signals that are just progressively shifted by Ts /10, the peak-to-peak post-interpolation error is approximately the same as the range of variability of εs , when the pulse delays are random. Note that the post-interpolation errors are much smaller than ±1 ns. Such values are compatible with the timestamping requirements described in Section I, regardless of the distribution of εs . B. Wideband Noise As known, the AWGN superimposed to the rising or falling edges of a binary waveform affects the time when a given threshold level is crossed. In particular, if the signal-to-noise ratio (SNR) is large enough, such a timing jitter exhibits a zero-mean Gaussian distribution with a standard deviation that, in a first approximation, grows linearly with the standard deviation of the noise and it is inversely proportional to the absolute value of the edge slope. Similar considerations hold also for the random variable εn in (7), since the sides of the correlation pulse in (6) are almost linear. However, in this case the overall jitter is about twice as large because the peak of the correlation pulse results from the intersection of a rising and a falling edge. In order to quantify the effect of the additive noise on Dk (taking into account both the thermal noise and the internal noise of the receiver), various distributions of εn for different SNR values were generated through Monte Carlo simulations, consisting of 10 000 runs each. In all simulations Dk,1 =1000·Ts (i.e., an integer multiple of Ts ). Also, the AWGN was added to the received waveform before applying the matched filter and the digital interpolator described in Section IV-A. Some results are shown in Fig. 3. A histogram describing the distribution of εn for SNR=30 dB is shown in Fig. 3(a). Clearly, the distribution is Gaussian and centered in zero, as expected. A more complete analysis of the effects of the wideband noise is visible in Fig. 3(b), where the mean and the standard deviation values of εn are reported as a function of SNR. Observe that the mean values are always negligible, whereas the standard deviation is about 2.8 ns for SNR=10 dB
and becomes smaller than 1 ns for SNR>20 dB. Therefore, the effect of wideband noise on subchirp correlation peak detection is generally not very relevant for typical SNR values. C. Frequency Offsets In the general analysis reported in Section III, the instantaneous frequency of the received subchirp is assumed to be exactly the same as the chirping frequency used in the matched filter. However, this condition is not very realistic, because of the tolerances and the jitter of the oscillators used both in the transmitter (TX) and in the receiver (RX). If we refer to ω˜ k as the random variable modeling the TX-RX frequency offset after down-conversion, the output of the matched filter under the same assumptions specified in Section III is given by (9). Note that in the ideal case (i.e., when ω˜ k = 0) (9) coincides with (6), as expected. On the contrary, when ω˜ k = 0, it can be easily shown that the magnitude of (9) is maximum for t ∼ = Dk,1 − μξω˜kk . Therefore, according to (7) the uncertainty contribution due to the frequency offset is approximately εo ∼ = − μξω˜kk . In general ω˜ k can be regarded as a normal random variable with nonzero mean and variance depending on the stability of the chosen oscillators. However, for very short time intervals (e.g., so long as Tchirp ), ω˜ k can be reasonably assumed to be constant. Therefore, the effect of the frequency offsets in the very short term can be regarded as systematic. The results of some simulations for subchirps k=2 and k=3 are shown in Figs. 4(a) and (b), respectively, as a function of the frequency offset, for SNR=30 dB. In all cases the nominal subchirp delay Dk,1 on the chosen timescale is the same as in Section IV-B. Observe that frequency offsets cause a linear time shift proportional to the value of the offset itself (≈120 ps/kHz). This means that in the case of a 2.4-GHz oscillator with a tolerance of ±50 ppm the largest possible frequency offset can reach ±120 kHz and the total time shift can be so large as ±14 ns. In practice, the trend of the time shift is related not only to the sign of the offset per se, but also to the chirping direction ξk . This is the reason why the behavior of the systematic shift in Figs. 4(a) and (b) is opposite. Note also that the standard deviation around the systematic time shift is constant and equal to 280 ps, because it is due only to the AWGN. Therefore, εo exhibits the same Gaussian distribution shown in Fig. 3(a), but with a mean value that changes linearly with the frequency offset. D. Multipath Propagation As known, multipath propagation generally changes the ideal shape, the power, and the position of the received correlation peaks due to the random overlap of multiple signal replicas. The amount of distortion as well as the time fluctuations affecting the correlation pulses strongly depend on the environment and may be particularly serious in NonLine-of-Sight (NLOS) conditions [31]. Unfortunately a detailed description of such phenomena requires an experimental characterization of the actually received in-channel power [32], which however is not stationary and can be hardly modeled in detail. Therefore, in order to analyze the effect of multipath in a quite general scenario and to build a trustworthy distribution
DE DOMINICIS et al.: TIMESTAMPING OF IEEE 802.15.4a CSS SIGNALS FOR WIRELESS RANGING AND TIME SYNCHRONIZATION
2291
yk lpeak − 1 − yk lpeak + 1 · Ts lpeak + 2 yk lpeak − 1 − 2 yk lpeak + yk lpeak + 1
ˆk = D
(8)
TABLE II Post-Interpolation Errors for Ten Fractional Delays Between 0 and Ts Fractional delay [% of Ts ] Post-interpolation error [ps]
yk (t) ∼ =
0 0
10% −110
20% −194
30% −223
40% −169
50% 0
60% 169
70% 223
2ω˜ +ω˜ ω˜ k +μξk (t−Dk,1 ) t − Dk,1 · ej k 2 k (t−Dk,1 ) T a1 45 Tsub − t − Dk,1 sinc − sub 2 0
80% 194
90% 110
− Tsub ≤ t − Dk,1 ≤ Tsub otherwise (9)
Fig. 3. Effect of AWGN on timestamping jitter. The histogram in (a) refers to SNR = 30 dB. In (b) mean value (solid line with cross markers) and standard deviation (dashed line with circle markers) of εn are reported as a function of SNR.
Fig. 4. Mean value (solid line with cross markers) and standard deviation (dashed line with circle markers) of εo as a function of different systematic transmitter-receiver frequency offsets for subchirps (a) k = 2 and (b) k = 3, respectively, when SNR = 30 dB.
2292
IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 62, NO. 8, AUGUST 2013
Fig. 5. (a) Distribution of εp in the presence of a strong multipath interference for a mean interarrival time equal to 5 ns. (b) Mean value (solid line with cross markers) and standard deviation (dashed line with circle markers) of εp , as a function of the number of replicas P.
of εp , an appropriate propagation model must be preliminarily chosen for simulation purposes. In our case the classic logarithmic path loss model PLp = PL0 + 10γp ·log10 (d/d0 ) is used to describe signal attenuation, where PL0 represents the path loss at a reference distance d0 = 1 m (e.g., PL0 = -40 dB), d is the actual TX-RX distance, and γp for p=1,. . . ,P is the path loss coefficient associated with the pth signal replica. In practice, γ1 =2 for the LOS component (i.e., like in the ideal free-space case), while the other γp values are assumed to be uniformly distributed between 2.3 and 2.7 [33]. Such random variations describe the changeable attenuations experienced by different replicas due to both reflections and scattering caused by objects and variable-length propagation paths. The interarrival time between subsequent replicas is assumed to be random and exponentially distributed with a mean value, which depends on the average distance between TX and RX. This memory-less model is usually too simple to capture the real complexity of specific indoor environments. Nonetheless, it is general enough to describe multipath propagation delays with reasonable accuracy in different contexts [34]. Again, the SNR at the receiving end is set equal to 30 dB, as in the previously simulated cases. Finally, the phase of the replicas is supposed to be uniformly distributed in [−π, π]. On the basis of the assumptions above, the temporal position of the correlation pulse at the output of the interpolation block is subjected to random fluctuations that are distributed as shown in Fig. 5(a). In the considered case study, the mean interarrival time is set equal to 5 ns and P = 6. Note that the distribution of εp ranges between -10 ns and +6 ns, with a mean value of 0.15 ns. In this case, the effect of multipath interference is actually dominated by the phase variations of the replicas. It should be emphasized that this is a quite pessimistic scenario. Indeed, when the transmitter and the receiver are located at a fixed distance from each other and the surrounding environment does not change significantly, the random variations are expected to be smaller and may
turn into systematic offsets [35]. In such cases, the real jitter of the correlation peak can be lower than the simulated one previously reported. In Fig. 5(b), the mean values and the standard deviations of εp are plotted as a function of P, using the same values listed above. Clearly, uncertainty tends to grow with the number of received replicas, but their power becomes smaller and smaller till being comparable to the noise floor. In particular, with the chosen values of the simulation parameters, this condition occurs for P>6. On the other hand, when the mean interrarival time grows (e.g., in a larger environment), replicas attenuation and dispersion also increase. Therefore, the influence of the LOS component on the correlation pulse tends to prevail over the higher-order replicas. As a result, the jitter affecting the peak decreases. E. Definition of Symbol Timestamp Instead of considering a single subchirp, a radio message can be potentially timestamped at the symbol level, as shown ˆ can be simply in Fig. 6. In this case, the symbol timestamp X defined as ˆ =1 D ˆ1+D ˆ2+D ˆ3+D ˆ4 X (10) 4 ˆ 1, D ˆ 2, D ˆ 3 , and D ˆ 4 refer to the estimated temporal where D positions of the correlation peaks of four subchirps belonging to the same CSS symbol. Again, the subscripts n and m are omitted in (10), because this definition is absolutely general, i.e., independent of the symbol shape and of the position of the symbol in the frame. The advantage of using symbol timestamping is a direct consequence of the results shown in the previous subsections. First of all, the symmetrical shape of the subchirps within any IEEE 802.15.4a symbol can be exploited to compensate the systematic time shifts caused by the residual frequency offset between TX and RX oscillators. Indeed, it was shown in Section IV-C that, for a given frequency offset, such time shifts tend to change in opposite
DE DOMINICIS et al.: TIMESTAMPING OF IEEE 802.15.4a CSS SIGNALS FOR WIRELESS RANGING AND TIME SYNCHRONIZATION
2293
Fig. 7. Symbol timestamping on the timescales of TX and RX. The initial time offset due to different epochs is preliminarily compensated. Fig. 6. Definition and benefits of IEEE 802.15.4a CSS frame timestamping at the symbol level.
directions when the chirping slopes are also opposite. Since any CSS symbol consists of two up-subchirps and two downsubchirps with the same rate (in absolute value), by using (10) the systematic time shifts caused by subsequent subchirps tend to cancel out each other, as shown in Fig. 6. In addition, by averaging four subsequent and mostly independent time values, the random fluctuations due to noise and multipath can be roughly reduced by a factor 2, thus further improving timestamping precision.
V. Experimental Characterization A. Experimental Setup The performances of CSS-based frame timestamping both at subchirp and at a symbol level have been evaluated experimentally on the field using two different Universal Software Radio Peripheral (USRP) platforms made by Ettus Research LLC. Such platforms (called USRP 1 and USRP N210) are used for up- and down-conversion of RF signals as well as for analog-to-digital (ADC) and digital-to-analog conversion (DAC). The RF front-end of both platforms relies on interchangeable daughter-boards receiving and transmitting signals up to 5.8 GHz. In particular, for the tests described in the following, both platforms were equipped with a RFX2400 transceiver connected to a omnidirectional dipole antenna. Baseband digital signal processing is implemented with GNU Radio, a Python-C++ open-source tool for SDR solutions running on two PCs [36]. The USRP 1 is connected to the host PCs through a USB 2.0 link at 480 Mb/s. It supports radio communications in channels with a bandwidth of up to 16 MHz and it is equipped with four 64 MSa/s 12-bit ADCs and four 128 MSa/s DACs. Also, it includes an Altera Cyclone field programmable gate array (FPGA) that can be used to implement four digital down-converters (DDCs) and two digital up-converters (DUCs) with programmable interpolation rates. The USRP N210 is similar to the USRP 1, but it is connected to the PCs through a Gigabit Ethernet link and it is provided with two 100 MSa/s 14-bit ADCs, two 400 MSa/s 16-bit DACs, and a Xilinx Spartan XC3SD3400A FPGA. This enables real-time data transfers of signals with a bandwidth of up to 50 MHz. During the experiments, the USRP platforms were kept steadily at a distance of
a few meters with their antennas parallel to one another. No specific setups for multipath reduction were used. Since the daughter-boards operate between 2300 and 2900 MHz, they perfectly cover the band between 2400 and 2483.5 MHz specified in the standard IEEE 802.15.4. In order to test the proposed timestamping mechanisms in different conditions, various configurations were used (e.g., using the USRP 1 and USRP N210 alternatively as TX or RX). Unfortunately, neither the USRP 1 nor USRP N210 are able to support real-time data transfers of I/Q samples at a rate of 32 MSa/s. For this reason, the experiments were conducted at variable sample rates between 4 MSa/s and 25 MSa/s. Moreover, due to the limitations of the available experimental setup, the USRP 1 was set only in receiving mode when used in combination with the URSP N210. The in-channel SNR was measured with a spectrum analyzer Tektronix RSA3408A and further estimated a posteriori using the received data stream, to make the comparison between experimental and simulated results as trustworthy and consistent as possible. B. Performance Metrics During the experimental sessions, the arbitrary epoch of (6) coincided with the transmission instant (on the TX timescale) of the first subchirp of the first symbol. A common time reference between TX and RX usually is not available, unless a time synchronization protocol is used. Therefore, in general a time offset exists between the TX timestamp of the nth symbol and the RX timestamp of the same symbol within a given frame, as shown in Fig. 7. This time offset is not constant, due to the frequency offsets of the local oscillators and to the accumulation of frequency and phase noise contributions. The proposed procedure relies on the fact that the TX timestamps are easily calculated as multiples of the sample time, since the subchirps are generated locally and the symbol position is predictable (a symbol consists indeed of exactly 192 samples). Thus, the time offset between TX and RX can be reset a posteriori. After compensating such an offset, the following metrics can be used for evaluating timestamping performance, i.e. 1) Mean symbol timestamping error, which is defined as: N−1 ˆ RX 1 X n TX ˆn STE = (11) −X N n=0 1 + ρˆ where
2294
IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 62, NO. 8, AUGUST 2013
Fig. 8. •
•
Distribution of the symbol timestamping errors in the case of data transfers between two N210 platforms: (a) Fs = 8 MSa/s. (b) Fs = 16 MSa/s.
ˆ nTX and X ˆ nRX are the timestamps of the nth symbol X estimated on the TX and RX timescales, respectively, assuming that the common epoch defined in (6) corresponds to the TX time of the first subchirp of the first symbol; ρˆ is the estimated relative frequency offset between TX and RX which results from N/2−1 ˆ RX ˆ RX 2 X n+N/2 − Xn ρˆ = −1 TX ˆ n+N/2 ˆ nTX N n=0 X −X
(12)
where the average is computed from the time differences of N/2 pairs of symbols in the same frame at a distance of N/2 symbols from each other. In fact, this approach makes the estimator variance smaller than computing the differences between adjacent symbols. 2) Standard deviation of the symbol timestamping error. This is the standard deviation of the symbol timestamp error within a received frame, i.e. 2 1 N−1
X ˆ nRX TX ˆ σSTE = − Xn − STE . (13) N − 1 n=0 1 + ρˆ C. Experimental Results In every experimental run 2000 frames of 86 symbols each (corresponding to 344 subchirps and 66 048 samples per frame) were transferred between different platforms. The corresponding measurement results are reported in Table III and IV. In all cases the SNR is about 30 dB. Before analyzing the performance metrics mentioned above, we also checked experimentally that the assumptions underlying the symbol timestamping policy defined in Section IV-E holds true. Table III shows the mean values and the standard deviations of the subchirp timing position errors (namely the differences ˆ k values and the nominal ones calbetween the estimated D culated with respect to the beginning of the frame) computed over all the subchirps of the same frame. Observe that the accuracy in detecting the temporal position of the subchirp
TABLE III Performance Analysis of Subchirp Temporal Position Estimation in a Frame Sample rate [MSa/s]
Estim. SNR [dB]
ρˆ [ppm] Mean value Std. [ns] Dev. [ns]
USRP 1
4
33
2.3
58
54
USRP N210 USRP 1
4
31
13
210
USRP N210 USRP N210 4
32
0.4
16
225 22
USRP 1
Tx
Rx
USRP 1
USRP 1
8
30
USRP N210 USRP 1
8
31
1.6 13
10 56
10 57
USRP N210 USRP N210 8 16
32 30
0.4 11
-1 14
5 15
USRP N210 USRP N210 16 USRP N210 USRP N210 25
32 32
0.4 0.3
10 2
12 2
USRP N210 USRP 1
TABLE IV Experimental Evaluation of Symbol Timestamping Performance Sample Estim. rate SNR [MSa/s] [dB]
ρˆ [ppm]
STE[ns] σSTE [ns]
USRP 1
4
33
2.3
2.0
10
USRP 1
4
31
USRP N210
USRP N210
4
32
13 0.4
1.1 0.9
2.4 2.2
USRP 1
USRP 1
8
30
USRP N210
USRP 1
8
31
1.6 13
0.1 0.1
1.6 2.1
USRP N210
USRP N210
8
USRP N210
USRP 1
16
32 30
0.4 11
-0.1 0.1
1.5 0.4
USRP N210
USRP N210
16
32
0.4
0.1
0.4
USRP N210
USRP N210
25
32
0.3
-0.2
0.2
Tx
Rx
USRP 1 USRP N210
correlation peaks increases as the sampling rate grows. This is reasonable because the temporal resolution is better and also the absolute resolution of the parabolic interpolator improves. On the other hand, the use of a particular hardware platform does not noticeably affect correlation peak estimation. Observe that the mean estimation errors are strongly affected by the relative TX-RX frequency offset. In this respect, it is worth emphasizing that the uncertainty associated to the ρˆ values
DE DOMINICIS et al.: TIMESTAMPING OF IEEE 802.15.4a CSS SIGNALS FOR WIRELESS RANGING AND TIME SYNCHRONIZATION
resulting from (12) and reported in Table III is negligible. This behavior is in accordance with the simulation-based analysis reported in Section IV and it confirms that the detection of the subchirp correlation peak is not the best choice for frame timestamping. Notice also that at lower sampling rates the mean errors are quite larger than expected because of the bias introduced by the analog RF sections before the ADC stage. However, such systematic contributions become negligible when Fs exceeds 20 MSa/s. As expected, the effect of the frequency offsets can be strongly reduced if the symbol timestamping mechanism defined in Section IV-E is used. In Table IV the metrics defined in the previous section are applied to the same data records used to build Table III. The values of STE and σ STE have been estimated accordingly. The values of the chosen performance metrics show that symbol timestamping is affected by fluctuations with a subnanosecond bias and a standard deviation ranging from a few nanoseconds (for lower data rates) down to some hundreds of ps at 25 MSa/s. Two histograms including all symbol timestamping uncertainty contributions are shown in Figs. 8(a) and (b), for Fs = 8 MSa/s and Fs = 16 MSa/s, respectively. Such distributions are compatible with the simulations shown in Section IV, although the effect of multipath is not particularly evident in the chosen environment. Moreover, we expect that a fully compliant IEEE 802.15.4 CSS-based implementation (i.e., at 32 MSa/s) could assure even better performance, thus enabling joint wireless time synchronization and ranging. VI. Conclusion As known, wireless ranging based on TOA measurements is heavily influenced by many layered uncertainty contributions introduced by the communication stack and by radio propagation vagaries. The Chirp Spread Spectrum (CSS) communication scheme described in the standard IEEE 802.15.4a2011 is often considered as one of the most effective solutions to reduce TOA measurement uncertainty. The analysis and the results reported in this paper confirm that CSS can assure accurate frame timestamping, even in the presence of significant non-ideal conditions. Time synchronization can be also enhanced accordingly. While the native jitter affecting the peak of the correlation pulse of a single received subchirp is in the order of some ns, frame timestamping accuracy can be further improved in two ways: 1) by using a simple digital parabolic interpolator at the output of the matched filter associated with each subchirp type; 2) by computing the average of four consecutive subchirp timestamps belonging to the same symbol. The first solution makes the error due to incoherent sampling and finite clock resolution negligible. The second technique instead has a double benefit: it roughly halves the jitter due to wideband noise and multipath propagation, and it tends to remove the systematic positive or negative time shifts caused by the frequency offset between TX and RX oscillators. Due to its intrinsic simplicity, the proposed timestamping approach is suitable for a possible on-chip implementation.
2295
Acknowledgment The authors would like to thank Mattia Rizzi for his help in processing the experimental data used in this paper. References [1] C.-Y. Chong and S. P. Kumar, “Sensor networks: Evolution, opportunities, and challenges,” Proc. IEEE, vol. 91, no. 8, pp. 1247–1256, Aug. 2003. [2] D. Macii, A. Boni, M. De Cecco, and D. Petri, “Multisensor data fusion,” IEEE Instrum. Meas. Mag., vol. 11, no. 3, pp. 24–33, Jun. 2008. [3] D. Macii, A. Ageev, and L. Abeni, “An energy saving criterion for wireless sensor networks with time synchronization requirements,” in Proc. 5th Int. Symp. Ind. Embedded Syst., Trento, Italy, Jul. 2010, pp. 166–173. [4] H. Liu, H. Darabi, P. Banerjee, and J. Liu, “Survey of wireless indoor positioning techniques and systems,” IEEE Trans. Syst., Man, Cybern., C. Appl. Rev., vol. 37, no. 6, pp. 1067–1080, Nov. 2007. [5] Y.-C. Wu, Q. Chaudhari, and E. Serpedin, “Clock synchronization of wireless sensor networks,” IEEE Signal Process. Mag., vol. 28, no. 1, pp. 124–138, Jan. 2011. [6] K. Römer and F. Mattern, “Toward a unified view on space and time in sensor networks,” Comput. Commun., vol. 28, no. 13, pp. 1484–1497, Aug. 2005. [7] J. Zheng and Y.-C. Wu, “Joint time synchronization and localization of an unknown node in wireless sensor networks,” IEEE Trans. Signal Process., vol. 58, no. 3, pp. 1309–1320, Mar. 2010. [8] G. Mao, B. Fidan, and B. O. Anderson, “Wireless sensor network localization techniques,” Elsevier Comput. Netw., vol. 51, no. 10, pp. 2529–2553, Jul. 2007. [9] A. Bondavalli, A. Ceccarelli, L. Falai, and M. Vadursi, “A new approach and a related tool for dependability measurements on distributed systems,” IEEE Trans. Instrum. Meas., vol. 59, no. 4, pp. 820–831, Apr. 2010. [10] M. Maroti, B. Kasy, G. Simon, and A. Ledeczi, “The flooding time synchronization protocol,” in Proc. 2nd Int. Conf. Embedded Networked Sensor Syst., Baltimore, MD, USA, Nov. 2004, pp. 39–49. [11] S. Yoon, C. Veerarittiphan, and M. Sichitiu, “Tiny-sync: Tight time synchronization for wireless sensor networks,” ACM Trans. Sen. Netw., vol. 3, no. 2, pp. 1–33, Jun. 2007. [12] L. Schenato and F. Fiorentin, “Average timesynch: A consensus-based protocol for clock synchronization in wireless sensor networks,” Elsevier Automatica, vol. 47, no. 9, pp. 1878–1886, Sep. 2011. [13] P. Ferrari, A. Flammini, D. Marioli, S. Rinaldi, and E. Sisinni, “On the implementation and performance assessment of a wirelessHART distributed packet analyzer,” IEEE Trans. Instrum. Meas., vol. 59, no. 5, pp. 1342–1352, May 2010. [14] J. Elson, L. Girod, and D. Estrin, “Fine-grained network time synchronization using reference broadcast,” in Proc. 5th Symp. Operating Syst. Design Implement., Boston, MA, USA, Dec. 2002, pp. 147–163. [15] IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems, IEEE Std. 1588-2008, Rev. of IEEE Std. 1588–2002), Jul. 2008. [16] T. Cooklev, J. C. Eidson, and A. Pakdaman, “An implementation of IEEE 1588 over IEEE 802.11b for synchronization of wireless local area network nodes,” IEEE Trans. Instrum. Meas., vol. 56, no. 5, pp. 1632–1639, Oct. 2007. [17] A. Mahmood and G. Gaderer, “Timestamping for IEEE 1588 based clock synchronization in wireless LAN,” in Proc. Int. IEEE Symp. Precision Clock Synchronization Meas., Control Commun., Brescia, Italy, Oct. 2009, pp. 1–6. [18] A. Mahmood, G. Gaderer, H. Trsek, S. Schwalowsky, and N. Kerö, “Toward high accuracy in IEEE 802.11 based clock synchronization using PTP,” in Proc. Int. IEEE Symp. Precision Clock Synchronization Meas., Control Commun., Munich, Germany, Sep. 2011, pp. 13–18. [19] Y. Jiang and V. C. M. Leung, “An asymmetric double sided two-way ranging for crystal offset,” in Proc. Int. Symp. Signals, Syst. Electron., Montreal, Canada, Jul.–Aug. 2007, pp. 525–528. [20] J. -Y. Lee and R. A. Scholtz, “Ranging in a dense multipath environment using an UWB radio link,” IEEE J. Sel. Areas Commun., vol. 20, no. 9, pp. 1677–1683, Dec. 2002. [21] A. De Angelis, M. Dionigi, A. Moschitta, and P. Carbone, “A low-cost ultrawideband indoor ranging system,” IEEE Trans. Instrum. Meas., vol. 58, no. 12, pp. 3935–3942, Dec. 2009.
2296
IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 62, NO. 8, AUGUST 2013
[22] C. M. De Dominicis, A. Flammini, S. Rinaldi, E. Sisinni, A. Cazzorla, A. Moschitta, and P. Carbone, “High-precision UWB-based timestamping,” in Proc. Int. IEEE Symp. Precision Clock Synchronization Meas., Control Commun., Munich, Germany, Sep. 2011, pp. 50–55. [23] IEEE Standard for Information Technology—Telecommunications and Information Exchange Between Systems—Local and Metropolitan Area Networks—Specific Requirement Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs), IEEE Std. 802.15.4a-2007, Amendment to IEEE Std. 802.15.4-2006, Sep. 2007. [24] IEEE Standard for Local and Metropolitan Area Networks—Part 15.4: Low-Rate Wireless Personal Area Networks (LR-WPANs), IEEE Std. 802.15.4-2011, Rev. IEEE Std. 802.15.4-2006, Sep. 2011. [25] H.-S. Ahn, H. Hur, and W.-S. Choi, “One-way ranging technique for CSS-based indoor localization,” in Proc. 6th IEEE Int. Conf. Ind. Inform. (INDIN 2008), Daejeon, Korea, Jul. 2008, pp. 1513–1518. [26] C. Rohrig and M. Müller, “Localization of sensor nodes in a wireless sensor network using the nanoLOC TRX transceiver,” in Proc. 69th Vehicular Technol. Conf., Barcelona, Spain, Apr. 2009, pp. 1–5. [27] C. M. De Dominicis, P. Ferrari, A. Flammini, and E. Sisinni, “Wireless sensors exploiting IEEE802.15.4a for precise timestamping,” in Proc. Int. IEEE Symp. Precision Clock Synchronization. Meas., Control Commun., Portsmouth, NH, USA, Sep.–Oct. 2010, pp. 48–54. [28] C. M. De Dominicis, P. Ferrari, E. Sisinni, A. Flammini, P. Pivato, and D. Macii, “Timestamping performance analysis of IEEE 802.15.4a systems based on SDR platforms,” in Proc. IEEE. Int. Instrum. Meas. Technol. Conf., Graz, Austria, May 2012, pp. 2034–2039. [29] M. I. Skolnik, Radar Handbook, 3rd ed. New York, NY, USA: McGrawHill, Jan. 2008. [30] G. Jacovitti and G. Scarano, “Discrete time techniques for time delay estimation,” IEEE Trans. Signal Process., vol. 41, no. 2, pp. 525–533, Feb. 1993. [31] C. Yoon and H. Cha, “Experimental analysis of IEEE 802.15.4a CSS ranging and its implications,” Elsevier Comput. Commun., vol. 34, no. 11, pp. 1361–1374, Jul. 2011. [32] L. Angrisani, M. D’Apuzzo, and M. Vadursi, “Power measurement in digital wireless communication systems through parametric spectral estimation,” IEEE Trans. Instrum. Meas., vol. 55, no. 4, pp. 1051–1058, Aug. 2006. [33] D. Lu and D. Rutledge, “Investigation of indoor radio channels from 2.4 GHz to 24 GHz,” in Proc. IEEE Antennas Propagation Soc. Int. Symp., Columbus, OH, USA, vol. 2. Jun. 2003, pp. 134–137. [34] H. Hashemi, “The indoor radio propagation channel,” Proc. IEEE, vol. 81, no. 7, pp. 943–968, Jul. 1993. [35] P. Pivato, S. Dalpez, and D. Macii, “Performance evaluation of chirp spread spectrum ranging for indoor embedded navigation systems,” in Proc. IEEE Symp. Ind. Embedded Syst., Karlsruhe, Germany, Jun. 2012, pp. 307–310. [36] GNU Radio (2012, Nov.) [Online]. Available: http://gnuradio.org
Chiara Maria De Dominicis was born in Brescia (BS), Italy, in 1980. She received the degree in electronic engineering from the University of Brescia, Brescia, in 2008, and the Ph.D. degree in electronic instrumentation from the University of Brescia in 2011. She is currently working on architectures and instrumentation for high-versatility wireless sensors. Her current research interests include softwaredefined radios, smart sensors, wireless sensor networks, and smart grids.
Paolo Pivato (S’05–M’12) received the M.S. degree in telecommunication engineering and the Ph.D. degree in information and communication technologies from the University of Trento, Trento, Italy, in 2009 and 2012, respectively. His current research interests include the design, implementation and characterization of embedded systems, wireless sensor networks, software-defined radios, and indoor localization.
Paolo Ferrari (S’00–M’04) was born in Brescia, Italy, in 1974. In 1999, he graduated with honors in electronic engineering from the University of Brescia, Brescia, Italy, where he received the Ph.D. degree in electronic instrumentation in 2003. He is currently an Assistant Professor with the Department of Information Engineering, University of Brescia. His current research interests include signal conditioning and processing for embedded measurement instrumentation, smart sensors, sensor networking, smart grids, real-time Ethernet, and fieldbus applications. Dr. Ferrari is a member of IEC TC65C MT9 and CENLEC/IEC TC65X IRWC.
David Macii (M’06) received the Ph.D. degree in Information Engineering from the University of Perugia, Italy, in 2003. He did research work in various institutions, particularly at the Department of Digital Networks, German Aerospace Center DLR in Munich, Germany, in 2000, with the Applied DSP and VLSI Research Group of the University of Westminster, London, U.K., in 2002, at the Advanced Learning and Research Institute (ALARI) of the University of Lugano, Switzerland between 2003 and 2005 and at the Berkeley Wireless Research Center (BWRC) of the University of California at Berkeley, Berkeley, CA, USA, between 2009 and 2010, as a Fulbright Research Scholar. Currently, he is an Assistant Professor at the Department of Industrial Engineering of the University of Trento, Trento, Italy. His research interests include design, implementation, and characterization of embedded systems, with a special emphasis on power reduction and estimation techniques, distributed synchronization, and wireless sensor networks.
Emiliano Sisinni (M’05) was born in Lauria, Potenza, Italy, in 1975. He received the Laurea degree in electronics engineering and the Ph.D. degree in electronic instrumentation from the University of Brescia, Brescia, Italy, in 2000 and 2004, respectively. He is currently an Assistant Professor with the Department of Information Engineering, University of Brescia. His research activity focuses on numerical signal analysis, with particular interest in DSPbased instrumentation. He has been involved in the development of new NDT instruments, in the design of high-resolution lowcost instrumentation for motion estimation and in the design of innovative methods for electronic noses signal processing. His current research interests include wireless sensor networking and software-defined radio for cognitive radio. Dr. E. Sisinni is member of IEC TC65C WG16 and WG17.
Alessandra Flammini (M’99–S’10) received the Laurea degree (Hons.) in physics from the University of Rome, Rome, Italy, in 1985. From 1985 to 1995, she was involved with industrial research and development on digital drive control. She is currently with the University of Brescia, Brescia, Italy, where she has been an Associate Professor since 2002. She is the responsible for the Electronics Laboratory and since 2004, she realized the National Competence Centre of Profibus Network Italia for PROFIBUS and PROFINET. She has authored and co-authored more than 150 international papers. Her current research interests include electronic instrumentation, digital processing of sensor signals, smart sensors, wired and wireless sensor networks with special attention to synchronization. Ms. Flammini was the Conference Co-Chair of ISPCS2009 in 2009 and in 2012 she was the Conference Co-Chair of SAS2012.