Abstract

For timing and synchronization system, digital phase-locked loop (DPLL) and Kalman filter all have been widely used as the clock tracking and clock correction schemes for the similar structure and properties. This paper compares the two schemes used for ultrawideband (UWB) location system. The improved Kalman filter is more immune to interference.

1. Introduction

Impulse radio ultrawideband (IR-UWB) [1] is considered to be promising for indoor location. To estimate the tags location using time difference of arrival- (TDOA-) based localization, the anchors’ local clocks are required to be fully synchronized with each other [2], but the anchors’ clocks are varied with the running time and temperature drift [3]. The anchors must be synchronized periodically [4]. The location system is as Figure 1 shows. There are four anchors: anchor 1 is selected as the reference anchor and the other three anchors are the passive anchors. The reference anchor sends the clock synchronization packets to its passive anchor, which are represented by the orange lines in Figure 1. The clock synchronization algorithm (Algorithm 1) that we used is one-way message dissemination [5]. The clock variance between the passive anchor’s local clock and its reference anchor is tracked. The data’s arrival time from tag to anchors is corrected for the same time base between the reference and passive anchors. Then the TDOA algorithm effectively gets the tag’s location. So how to track the clock variance between reference-passive anchors is important for UWB location.

;
;
;
if (OM > threshold) && (counter > 20),
outlier = 1;
measuredError = 0.0;
outlier_counter = outlier_counter + 1;
if outlier_counter > 8,
outlier_counter = 0;
counter = 0;
end
;
EstimatedTime;
else
;
;

Traditionally, we model the clock time as a continuous function of clock skew (frequency difference) and the clock offset (phase difference) [6].where denotes a reference clock of the sending anchor and denotes the local clock of the receiving anchor. In digital clocks, time is recorded by counting the number of periods of a repeating clock signal. At each rising clock edge of the periodic signal, an integer time counter is incremented.

The main problem of network synchronization is to resolve the observed time in (1). The algorithms considered here use a one-way message dissemination approach at the level of discrete clock ticks.

Suppose that the anchors all have the features of transmitting and receiving the clock check packets (CCP) with the time stamps, and the initial master anchor transmits a CCP with period , as shown in Figure 2. In the round of broadcast message, reference anchor broadcasts a synchronization message CCP at and the passive anchor records its time at the reception of that message. denotes the interval between receiving a signal and the following initial local clock tick caused by the clock offset. According to [5], the timing model of the broadcast message is given bywhere is the random variable delay in the transmission.

The clock tracking is implemented with the main “process” function taking two inputs: (1) The slave anchor CCP receiving time with its time base. (2) The master anchor CCP transmitting time with its time base and the CCP time of flight (TOF).

According to Figure 3, the clock tracking process uses CCP receiving time and CCP transmitting time and the best estimated time between the master unit and the slave unit. If given the master and slave anchors’ () coordinates, the CCP TOF will be obtained by dividing the distance by the speed. At last, clock tracking process draws the real relative clock offset and the best estimated relative clock offset between master and slave units. Digital phase-locked loop (DPLL) and Kalman filter both have been widely used as the clock tracking and clock correction schemes for the similar structure and properties. This paper compares the two schemes used for UWB location system.

2. Digital Phase-Locked Loop

Digital phase-locked loop (DPLL) is a digital closed-loop automatic control system that can follow the frequency and phase of the input signals [7, 8]. For UWB location system, we consider a second-order DPLL based on ZC-DPLL, as Figure 4 shows.

Assume that is the input signal, is zero mean additive white Gaussian noise, and is the input signal clock period without correction. The input signal with is sampled at by digital clock to output the loop phase error . Ignore the impact of the quantizer; the sequence directly comes into the digital filter; by smoothing, the digital filter outputs a more reliable correcting sequence to digital clock: . The second-order operator function iswhere and are the loop gain factors. Assume that the loop gains of second-order DPLL are and , respectively.

In DPLL, correction signal is used to control the next period: . Adjust until the loop into the locked state is the sample interval: .

The sampling time is deduced:

3. Kalman Filter

Kalman filter is the solution by the minimum mean square error (MMSE) of the optimal linear filtering [9, 10]. It estimates the current signal value according to the previous estimation and a recent observation data. In the concrete implementation process, the period clock skew and clock drift of the master-slave clock is estimated according to the sync cycle information. is the clock synchronization period; and are the correction of the clock skew and clock offset at the clock period, respectively. and are the clock skew and clock offset, respectively. At the moment of , the clock relations between the adjacent clock periods arewhere is the clock skew variance and is the clock offset variance. Assume that ; its additive covariance matrix is . We define the vector and matrix as follows:

Kalman filter equations by iteration are as follows.

(1) Estimationwhere , , is the state to be estimated, and is the input control vector.

(2) MMSE Matrix of the Estimationwhere is the MMSE matrix of the estimated .

(3) Kalman Filter Gain Matrixwhere is the covariance matrix of the observation noise and the measurement matrix is a unit matrix.

(4) Correction

(5) MMSE Matrix

After Kalman filtering, the correction is at the clock period. is set to make up for the clock skew and clock offset. So the slave anchor’s clock base will make up to the same clock base when the tag’s data arrives.

Relative to DPLL, we define and define the Kalman gain vector as . , where is the variance of the initial phase ; is the normalized variance values of with zero average distribution. The error is .

According to (4)–(7), as , we will get

Comparing (5) and (13), the recursive types are very similar. The Kalman filter structure is depicted in Figure 5.

4. Comparison and Analysis

According to the above descriptions about Kalman filter and DPLL, we compare the two schemes for UWB indoor location. In DPLL, correction sequences as the output of the signal through digital filtering control the digital clock period until the loop is locked. Kalman filter also abstracts the needed signal through the feedback loop, which uses the former data to estimate the current data. The two schemes use the error through gain factor to find the optimal estimation. By comparing (5) and (13), we just need to adjust gain factor so as to get the similar results.

We define the passive anchor clock variance error between the real clock variance and the optimal estimated clock variance as . Using the reference-passive anchors data backhaul sending time, data receiving time, and the optimal estimated time with the data flight time, the location engine in the server will calculate the relative clock offset variance.

The paper uses Matlab for simulation. Assume that the anchors’ coordinates are anchor1 () and anchor2 (). The TOF of the reference anchor1 to the passive anchor2 is  s. For second-order DPLL, variable loop gains with lower bounds , ,  dB, , and . The clock synchronization period is 150 ms. The measurement noise variance is ; the process noise variance is . Alternatively, a more complex multistage in-lock and out-of-lock detection algorithm may be employed, which trades off acquisition, tracking, and false lock performance according to the system requirements. Such tradeoff issues are beyond the scope of this paper [11, 12].

As Figure 6 shows, the green line is the clock variance difference by Kalman filter and the black line is that by DPLL. They all tend to be stable over time, but the properties of Kalman filter are significantly better than those of DPLL. Kalman filter requires shorter capture time and smaller error.

By the theory of hypothesis, in order to give sufficient information for the DPLL to stay locked for continued real-time location system operation with good performance (including coping with a certain packet error/loss rate), we need to send the clock synchronization message more frequently than for Kalman filter. It reduces the air-occupancy needed for clock synchronization messages, which allows more air-time for receiving blink messages. This essentially increases the system tag capacity, especially in the lower data rate and longer preamble modes.

5. Improved Algorithms on Kalman Filter

As stated above, Kalman filter is better for clock synchronization indoor UWB location system. Its calculation is based on such an assumption: all measurements are composed of the real signal and additive Gaussian noise. If these assumptions are correct, Kalman filter will effectively get signal from the measurements containing noise. But if the reference anchor’s clock check packets collide with tag’s data packets with TOA or some other mistake challenges in [13], the assumptions are incorrect. Kalman filter will treat the collision or mistake as credible clock variance data, and it calculates by these data. And Kalman filter itself is a kind of low-pass filter; its response and correcting speed are slower. Therefore, the errors generated by the collision will for a long time seriously degrade the performance of the clock synchronization algorithm.

This paper proposes a method of monitoring and avoiding the wrong of collisions. Kalman filter gain is as (10) shows, defining an information matrix as is used to represent the difference between estimated clock error and actual clock error. This information will be used to prompt how well the current input fits the current state of filter.

If the OM (outlier metric) rises above a preset threshold which is an empirical value, the current input is untrusted. The improved Kalman filter does not update current state but discards this data directly to avoid error packet having a big impact for filter output.

In Figures 7 and 8, the blue lines are the real clock offsets and the red lines are the estimated clock offset by Kalman filter. We set a big data mistake at 150 s; the estimated clock offset is unable to keep pace with the real clock offset and up and down shocks with Kalman filter in Figure 7. With the resolution of the trustless input, the estimated clock offset is smooth in Figure 8. By comparing Figures 7 and 8, it is clearly seen that the improved Kalman filter enhances the capacity of resisting disturbance.

6. Conclusion

We have compared DPLL and Kalman filter for UWB indoor location network clock synchronization, and the analysis results show that Kalman filter copes better with clock errors and has better lock performance. And the improved Kalman filter is more immune to interference as the simulation results show.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This work was supported in part by Major Research and Development Plan of Hainan Province (ZDYF2016002), the National Natural Science Foundation of China (61461017), Hainan Province Natural Science Foundation of Innovation Team Project (2017CXTD004), and Innovative Research Project of Postgraduates in Hainan Province (Hyb2017-04).