Professional Documents
Culture Documents
B. Clock Terminology
(a) Adjusting Sampling Position (b) Time Offset
Every AN in a time-based localization system has its own
clock. Assuming that the reference time of the whole system is Fig. 1: Time Recovery
C(t) = t, ideally, the local time of the ith AN (ANi ) should be
Ci (t) = t. However, even if started at exactly the same time,
local clocks will drift away from the reference time because
of frequency deviations of the oscillator.
Generally, the clock function of ANi is modeled as
t
Ci (t) = Δfi (t) dt + Δθi (1)
0
where the parameters Δfi (t) and Δθi are the clock skew Fig. 2: Digital Architecture of Time Recovery Loop
and initial clock offset at ANi . In this paper we use the
nomenclature from [6] to define that ΔCij (t) = Ci (t) − Cj (t)
is the relative clock offset, and Δfij (t) = Δfi (t) − Δfj (t) A. Pulse Sampling and Time Recovery
is the relative clock skew between ANi and ANj . Table I
introduces the notations used in the paper. In an ideal system, where the transmitter and receiver are
perfectly synchronized, timestamps are taken at the optimal
C. Quantifying Synchronization Accuracy sampling moment of a symbol. In the case of a GMSK
modulation system, as applied in GSM, the signal is shaped
One method to determine whether two devices (e.g., ANs) by a Gaussian filter and thus the optimal sampling position is
are synchronized is to compare their timestamps for the same at the peak of the Gaussian pulse g(t) as shown in Figure 1(a).
receiving message emitted by an equidistant reference node. Denoting the sampling phase by τk , sampling would be on the
In a real wireless network the timestamp for the received peak of the pulse when g(τk − Tb ) = g(τk + Tb ), where Tb
message reflects the signal propagation time as well as the is the symbol interval [10]. The reason for this is the evenly
time spent in receiving and processing the message at the symmetric shape of the Gaussian pulse.
receiver node [7], [8]. Hence, a timestamp is best given close
to the physical layer to avoid influences from processing time In practical systems, however, the receiver is not syn-
at the Media Access Control (MAC) or higher layers. At the chronous with the incoming data due to free running oscillators
physical layer, a conventional timestamp [9] is the hardware- of the Digital-to-Analogue Converter (DAC) at the transmitter
given time when a sample of a packet is received, e.g., the and the Analogue-to-Digital Converter (ADC) at the receiver.
last or first sample of a training sequence. The conventional This results in suboptimal sampling, i.e., the actual sampling
timestamp is limited by signal properties such as bandwidth position is often before (as in Figure1(a)) or after the peak,
and symbol rate. In the case of a GSM signal with symbol rate displaced at μ(k). μ(k) is the normalized timing error given
of 270.8KHz, a conventional timestamp can not distinguish by:
time differences within one symbol interval (3.7μs) and thus ΔT (k)
μ(k) = , (2)
the corresponding timestamp resolution is only 3.7μs. Ts
where ΔT (k) is the offset between the actual and optimal
III. S YNCHRONIZATION ACCURACY VIA T IME R ECOVERY sampling positions and Ts is the constant sampling interval.
The quality of the sampling process directly affects the If two co-located receivers are not perfectly synchronized
quality of the taken timestamp. Several methods have been with each other, the shift in sampling position, μ(k), will
developed to improve the sampling process for signal recovery, be different for each receiver. We denote Δμ12 (k) as the
such as time recovery [10]. We go one step further and exploit difference in μ(k) between two receivers as shown in Figure
the method of the time recovery to achieve highly accurate 1(b). The better we can calculate Δμ12 (k), the more accurately
calculation of the synchronization misalignment among nodes. we can evaluate the degree of synchronization.
Figure 2 shows the architecture of an error tracking time Furthermore, considering Equation (1) and t = k · Ts , we
recovery loop, which is adopted to correct the shift in the can calculate
sampling position [10]. The sample stream is fed into a Timing ΔCij (t) = Ts · Δμij (t)
Error Detection (TED) module to extract the timing error t
(7)
information between the actual and optimal sample positions. = Δfij (t)dt + Δθij ,
The timing error information is passed to a loop filter, which 0
outputs the normalized timing error μ(k) to decide on the cor- where Δθij , the relative initial clock offset between ANi
rection of the sampling time in the re-sampler. Subsequently, and ANj , is constant. Therefore, we can analyze the short-
the sampling position can be adjusted to be closer to the term clock drift through the relative normalized timing error
optimal one. Δμij (t). If there is no short-term clock drift, Δμij (t) would be
constant. Otherwise, Δμij (t) would fluctuate. We can use this
to identify the presence of short-term clock drift by monitoring
B. Relative Clock Offset and Skew Calculation
the behavior of Δμij (t).
In this subsection, we will derive the relation between the 2) Relative Clock Skew via Savitzky-Golay Filter: Here we
normalized timing error μ(k), the clock offset and skew. At derive how to obtain the relative clock skew between two ANs.
the physical layer a conventional timestamp T (k) for the Based on Equation (7), we can obtain the relative clock skew
kth sample from the beginning of the sample stream can be in an ideal case as
obtained as follows [9]:
d d
Δfij (t) = ΔCij (t) = Ts · Δμij (t) . (8)
T (k) = T (1) + Ts ∗ (k − 1), (3) dt dt
Therefore, the relative clock skew can be calculated by the
where T (1) is the conventional timestamp for the first sample differentiation of ΔCij (t) or Δμij (t).
in the stream. Equation (3) indicates that the conventional
timestamp can only change at a step of Ts and hence the However, in practice, the measurement of Δμij (t) is noisy
resolution is limited by Ts . With μ(k) obtained by the time and it is hard to accurately measure its differentiation. There-
recovery, we can improve the resolution as: fore, in our work, we propose to estimate the relative clock
skew in two steps.
At the first step, an S-G filter [11] is applied to smooth the
T (k) = T (k) + μ(k) · Ts , (4) measured Δμij (t). The S-G filter applies a moving window
smoothing technique based on least squares polynomial fitting.
where T (k) is the improved timestamp. Assuming that the We take the group of 2M + 1 samples of Δμij (t) centered
first sample of the received packet is the kth sample from at n, which is moving from 0 to the end of the samples. We
the beginning of the sample stream, T (k) is the improved obtain the coefficients of a polynomial,
timestamp for this packet.
N
1) Relative Clock Offset without Long Term Clock Drift: Δμij (n) = aj nj , (9)
GPS synchronization is well known to not have long-term j=0
clock drift. In the case that the sampling interval Ts is in
which minimizes the mean-squared approximation error,
the range of microseconds and GPS synchronization offset is
smaller than one microsecond, the clock offset between two M
ANs is smaller than the sampling interval Ts at any moment. εN = (Δμij (n) − Δμij (n))2
In such case, we can derive the relation between the relative n=−M
M N
(10)
clock offset and the relative normalized timing error. Based
on Equation (4) and the definition of relative clock offset, we = ( aj nj − Δμij (n))2 ,
can obtain the relative clock offset between the ith and jth n=−M j=0
receivers,
where N is the order of polynomial and 2M + 1 is the size
ΔCij (k) = Ti (k) − Tj (k) of the moving window. The coefficients [a0 , a1 , ..., aN ] are
= (Ti (k) + μi (k) · Ts ) − (Tj (k) + μj (k) · Ts ). adaptive in each window. Δμij (n) is the output of the filter
(5) and sampled Δμij (t) with sampling space of Ts .
At the second step, the differentiation of the filtered value
If the relative clock offset is always smaller than the Δμij (t) or ΔCij
(t) will be calculated to obtain the relative
sampling interval Ts , we can get that Ti (k) = Tj (k) for the clock skew as follows,
same packet k. Therefore, we can further simplify Equation d
d
Δfij (t) = ΔCij (t) = Ts · Δμij (t) . (11)
(5) as, dt dt
ΔCij (k) = μi (k) · Ts − μj (k) · Ts IV. T IMING INFORMATION E XTRACTION IN SDR
(6)
= Δμij (k) · Ts , A. Hardware
where Δμij (k) = μi (k) − μj (k). In the above equation, Ts is In our evaluations, we use Software Defined Radio (SDR)
constant and, thus, the relative clock offset is determined by implementations for the transmitter (packet source) and re-
Δμij (k). ceivers (ANs). We use the Universal Software Radio Peripheral
(a) GPS Synchronization Structure (b) GMSK Receiver with Enhanced Timestamp
Δ μ (t)
200 200 0.1
12
100 100 0.05
4.5min
0 0 0
Initialization
Phase
−100 −100 −0.05
(a) Initialization Phase of GPS Synchronization (M1) (b) Clock Offset in the Stable Phase (M2)
1 150 1
90% 90%
Noisy data
0.8 Relative Clock Offset (ns) Filtered data 0.8
100
0.6 0.6
CDF
CDF
0.4 0.4
50 Measurement noise
0.2 0.2
0 0
0 50ns 100ns 150ns 200ns 0 0 1.5 3 4.5 6
|Δ C | 0 40s 80s 120s 160s 200s
i,j Observation Time |Δ fi,j| −10
x 10
(a) CDF of the Relative Clock Offset (M2) (b) Data Filtering with S-G Filter (M2) (c) CDF of the Relative Clock Skew (M2)
Initialization Phase. It is important to measure the length show that the maximum measured clock offset between the two
of the initialization phase, during which applications with high receivers is 171ns, resulting in more than 51m localization
requirements of accurate synchronization, e.g., localization, error for time-based localization. The 90% synchronization
should be avoided. The first measurement denoted as M1 is accuracy is 66ns, corresponding to 19.8m localization error
conducted to measure the length of the initialization phase. for time-based localization.
With our proposed method, we start to record the clock offset
as soon as the two GPS receivers are powered on. Figure TABLE II: Relative Clock offset (ΔCi,j ) between Two GPS
5(a) indicates the changes of the relative clock offset between Receivers
two GPS receivers over 40 minutes. We find that the GPS
receivers need around 4.5 minutes to synchronize with each Measurement Mean SD Maximum 90% Accuracy
ΔCi,j ΔCi,j |ΔCi,j | |ΔCi,j |
other. After the initialization phase, the clock offset between M2 7ns 37.1ns 171ns 66ns
two GPS receivers becomes stable. M3 -69.4ns 65.4ns 228ns 150ns
R EFERENCES
line of sight connection to the transmitter were separated by
eight meters in an indoor environment as shown in Figure [1] D. Zhang, F. Xia, Z. Yang, L. Yao, and W. Zhao, “Localization tech-
nologies for indoor human tracking,” in Future Information Technology
4(b). The measurement results are summarized in the second (FutureTech), 2010 5th International Conference on, May 2010, pp.
row of Table II. We observe that there is a short-term clock 1–6.
offset between the receivers with deviation of 65.4ns. More [2] H. Liu, H. Darabi, P. Banerjee, and J. Liu, “Survey of wireless indoor
importantly, the mean value of the synchronization offset is positioning techniques and systems,” Systems, Man, and Cybernetics,
-69.4ns, which is shifted at a 76.4ns offset compared to the Part C: Applications and Reviews, IEEE Transactions on, vol. 37, no. 6,
mean value of 7ns in the measurement M2. This is caused by pp. 1067–1080, Nov 2007.
multipath propagation. [3] Y. Gu, A. Lo, and I. Niemegeers, “A survey of indoor positioning
systems for wireless personal networks,” Communications Surveys
Tutorials, IEEE, vol. 11, no. 1, pp. 13–32, First 2009.
D. TDOA Measurement with GPS Synchronization [4] J. yong Yoon, J.-W. Kim, W.-H. Lee, and D.-S. Eom, “A tdoa-based
localization using precise time-synchronization,” in Advanced Commu-
We further do measurements to test TDOA accuracy with nication Technology (ICACT), 2012 14th International Conference on,
GPS synchronization. The measurements were conducted in Feb 2012, pp. 1266–1271.
an open space football field to minimize the influence of [5] R. Schafer, “What is a savitzky-golay filter? [lecture notes],” Signal
multipath propagation. The layout of the measurement is given Processing Magazine, IEEE, vol. 28, no. 4, pp. 111–117, July 2011.
in Figure 7. The improved timestamp of Equation (4) is used [6] S. Moon, P. Skelly, and D. Towsley, “Estimation and removal of clock
to obtain high resolution timestamps of nanoseconds. TDOA skew from network delay measurements,” in INFOCOM ’99. Eighteenth
values are calculated for two different positions of the object. Annual Joint Conference of the IEEE Computer and Communications
Societies. Proceedings. IEEE, vol. 1, Mar 1999, pp. 227–234 vol.1.
The Reference Node (RN) is set in the center of the triangle
[7] Y.-C. Wu, Q. Chaudhari, and E. Serpedin, “Clock synchronization of
and periodically transmits packets to allow the receivers to wireless sensor networks,” Signal Processing Magazine, IEEE, vol. 28,
check their synchronization offset. no. 1, pp. 124–138, Jan 2011.
[8] S. Ganeriwal, R. Kumar, and M. B. Srivastava, “Timing-sync protocol
for sensor networks,” in Proceedings of the 1st International Conference
TABLE III: Ranging Error For Open Space Environment on Embedded Networked Sensor Systems, 2003.
EXP No. Algorithms Rx1 and 2 Rx2 and 3 Rx1 and 3 [9] G. Nychis, T. Hottelier, Z. Yang, S. Seshan, and P. Steenkiste, “Enabling
EXP1 TDOA 5.6m 22.6m 23.1m mac protocol implementations on software-defined radios,” in Proceed-
SYN offset -38ns -50ns -77ns ings of the 6th USENIX Symposium on Networked Systems Design and
EXP2 TDOA 5.5m 39m 33.5m Implementation, 2009.
SYN offset -58ns 161ns 105ns [10] H. Meyr, M. Moeneclaey, and S. Fechtel, Digital Communication
Receivers: Synchronization, Channel Estimation, and Signal Processing,
1997.
Table III summarizes the TDOA ranging errors, i.e., the [11] S. Krishnan and C. Seelamantula, “On the selection of optimum
absolute values of the offset between the estimated distance savitzky-golay filters,” Signal Processing, IEEE Transactions on,
and the real distance. The rows of SYN offset indicate the vol. 61, no. 2, pp. 380–391, Jan 2013.
average synchronization offset between two receivers. For [12] “Usrp n200/n210 networked series data sheet,” 2012.
example, for experiment 1, the synchronization offset of 38ns [13] “Gpsdo kit instructions and data sheet,” 2012.
between receiver 1 and 2 means that the clock of receiver 1
is 38ns later than receiver 2. The maximum TDOA ranging
error with GPS synchronization reaches 39m. This further
supports our finding that GPS synchronization may gener-
ate large synchronization offsets between ANs. Furthermore,
based on the packets from the RN, we find that the maximum
synchronization offset between the receivers is 161ns, which
is the main reason for TDOA ranging errors in this open space
environment. Therefore, calculating and compensating for the
remaining GPS synchronization offset is very important for
accurate localization.