Comparing Digital Phase-Locked Loop and Kalman Filter for ...International Journal ofAerospace...
Transcript of Comparing Digital Phase-Locked Loop and Kalman Filter for ...International Journal ofAerospace...
Research ArticleComparing Digital Phase-Locked Loop and Kalman Filter forClock Tracking in Ultrawideband Location System
Qian Gao,1,2 Chong Shen ,1,2 and Kun Zhang1,2,3
1State Key Laboratory of Marine Resources Utilization in South China Sea, Hainan University, Haikou, Hainan 570228, China2College of Information Science and Technology, Hainan University, Haikou, Hainan 570228, China3College of Ocean Information Engineering, Hainan Tropical Ocean University, Sanya, Hainan 572022, China
Correspondence should be addressed to Chong Shen; sc [email protected]
Received 5 January 2018; Accepted 8 March 2018; Published 18 April 2018
Academic Editor: Jose R. C. Piqueira
Copyright Β© 2018 QianGao et al.This is an open access article distributed under the Creative CommonsAttribution License, whichpermits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
For timing and synchronization system, digital phase-locked loop (DPLL) and Kalman filter all have been widely used as the clocktracking and clock correction schemes for the similar structure and properties. This paper compares the two schemes used forultrawideband (UWB) location system. The improved Kalman filter is more immune to interference.
1. Introduction
Impulse radio ultrawideband (IR-UWB) [1] is considered tobe promising for indoor location. To estimate the tags loca-tion using time difference of arrival- (TDOA-) based local-ization, the anchorsβ local clocks are required to be fullysynchronized with each other [2], but the anchorsβ clocksare varied with the running time and temperature drift [3].The anchors must be synchronized periodically [4]. Thelocation system is as Figure 1 shows. There are four anchors:anchor 1 is selected as the reference anchor and the otherthree anchors are the passive anchors. The reference anchorsends the clock synchronization packets to its passive anchor,which are represented by the orange lines in Figure 1. Theclock synchronization algorithm (Algorithm 1) that we usedis one-way message dissemination [5]. The clock variancebetween the passive anchorβs local clock and its referenceanchor is tracked. The dataβs arrival time from tag to anchorsis corrected for the same time base between the reference andpassive anchors. Then the TDOA algorithm effectively getsthe tagβs location. So how to track the clock variance betweenreference-passive anchors is important for UWB location.
Traditionally, we model the clock time as a continuousfunction of clock skew (frequency difference) πΎ and the clockoffset (phase difference) π [6].
πΆπ (π‘) = π‘,
πΆπ (π‘) = πΎ β π‘ + π,(1)
where πΆπ(π‘) denotes a reference clock of the sending anchorand πΆπ (π‘) denotes the local clock of the receiving anchor. Indigital clocks, time is recorded by counting the number ofperiods of a repeating clock signal. At each rising clock edgeof the periodic signal, an integer time counter is incremented.
The main problem of network synchronization is to re-solve the observed time in (1).The algorithms considered hereuse a one-waymessage dissemination approach at the level ofdiscrete clock ticks.
Suppose that the anchors all have the features of trans-mitting and receiving the clock check packets (CCP) withthe time stamps, and the initial master anchor transmits aCCP with period π, as shown in Figure 2. In the πth round ofbroadcast message, reference anchor broadcasts a synchroni-zation message CCP at π1,π and the passive anchor recordsits time π2,π at the reception of that message. Ξ π denotes theinterval between receiving a signal and the following initiallocal clock tick caused by the clock offset. According to [5],the timing model of the πth broadcast message is given by
π2,π β πΎ β π1,π + π + ππ, (2)where ππ is the random variable delay in the transmission.
HindawiJournal of Electrical and Computer EngineeringVolume 2018, Article ID 5873239, 5 pageshttps://doi.org/10.1155/2018/5873239
2 Journal of Electrical and Computer Engineering
Anchor 1 Anchor 2
Anchor 3
Tag
Anchor 4
Tag
Location engine
Ethernet/WLAN
Clock andsynchronization
Location broadcast
Figure 1: IR-UWB location system diagram.
Reference anchor
Passive anchor
T
T1,jβ1 T1,j
Ξ kβ1 Ξj
T2,jT2,jβ1
Ts
Figure 2: Space-time of reference-passive anchors.
The clock tracking is implemented with the main βpro-cessβ function taking two inputs: (1) The slave anchor CCPreceiving time with its time base. (2)Themaster anchor CCPtransmitting time with its time base and the CCP time offlight (TOF).
According to Figure 3, the clock tracking process usesCCP receiving time and CCP transmitting time and the bestestimated 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 bythe speed. At last, clock tracking process draws the real rela-tive clock offset and the best estimated relative clock offsetbetween master and slave units. Digital phase-locked loop(DPLL) and Kalman filter both have been widely used as theclock tracking and clock correction schemes for the simi-lar structure and properties. This paper compares the twoschemes used for UWB location system.
2. Digital Phase-Locked Loop
Digital phase-locked loop (DPLL) is a digital closed-loopautomatic control system that can follow the frequency andphase of the input signals [7, 8]. For UWB location system,we consider a second-order DPLL based on ZC-DPLL, asFigure 4 shows.
Assume that π (π‘) is the input signal, π(π‘) is zero meanadditive white Gaussian noise, andπ0 is the input signal clockperiod without correction. The input signal π (π‘) with π(π‘)is sampled at π‘π by digital clock to output the loop phase
CCP reception time
CCP transmission time
CCP estimated time
Real reception clock offset
Estimated clock offsetZβ1
Zβ1
Zβ1
ββ
β
β
β
Figure 3: The relative clock variation by clock tracking.
π = π΄ β π β trans(π΄) + π;π½ = 1/(π + π» β π β trans(π»));OM = measuredError β π½ βmeasuredError;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π₯0 = π₯ 0 + ππ‘;EstimatedTime(π) = π₯0;elseπΎ = π β trans(π») β inv(π» β π β trans(π») + π );π₯ = π₯ + πΎ βmeasuredError;
Algorithm 1
error π§π. Ignore the impact of the quantizer; the sequence {π§π}directly comes into the digital filter; by smoothing, the digitalfilter outputs a more reliable correcting sequence {π¦π} to digi-tal clock: π¦π = π·(π§)π§π. The second-order π§ operator functionis
π·(π§) = πΊ1 + πΊ2 (1 β π§β1)β1
, (3)
where πΊ1 and πΊ2 are the loop gain factors. Assume that theloop gains of second-order DPLL are πΎ0π and πΎ1π, respec-tively.
π¦π = πΎ0ππ§π + πΎ1ππ
βπ=0
π§π. (4)
In DPLL, correction signal π¦π is used to control the nextperiod:ππ+1 = π0βπ¦π. Adjustππ until the loop into the lockedstate ππ is the sample interval: ππ = π‘π β π‘πβ1, π = 1, 2, . . ..
The sampling time π‘π is deduced:
οΏ½οΏ½π+1 = οΏ½οΏ½π + π0 + πΎ0ππ§π + πΎ1ππ
βπ=0
π§π. (5)
Journal of Electrical and Computer Engineering 3
Band-
VCO
s(t)
n(t)x(t) zk
T
G1
Kof
K1f
G2yk
βpassfilter
Figure 4: DPLL structure block diagram.
3. Kalman Filter
Kalman filter is the solution by the minimum mean squareerror (MMSE) of the optimal linear filtering [9, 10]. Itestimates the current signal value according to the previousestimation and a recent observation data. In the concreteimplementation process, the (π + 1)th period clock skew andclock drift of the master-slave clock is estimated according tothe πth sync cycle information.π is the clock synchronizationperiod;ππ,π andππΎ,π are the correction of the clock skew andclock offset at the πth clock period, respectively. ππ and πΎπare the ππ clock skew and clock offset, respectively. At themoment of (π + 1)π, the clock relations between the adjacentclock periods are
ππ+1 = ππ β ππ,π + (πΎπ β ππΎ,π) π + ππ,π
πΎπ+1 = πΎπ β ππΎ,π + ππΎ,(6)
where ππ,π is the clock skew variance and ππΎ,π is the clockoffset variance. Assume that ππ = [ππ,π ππΎ,π]π; its additivecovariance matrix is π. We define the vector and matrix asfollows:
π₯π = [ππ; πΎπ]π ,
π’π = [ππ,π; ππΎ,π]π.
(7)
Kalman filter equations by iteration are as follows.
(1) Estimation
π₯π+1|π = π΄π₯π + π΅π’π, (8)
where π΄ = [ 1 π0 1 ], π΅ = [ β1 βπ0 β1 ], π₯π is the state to be estimated,and π’π is the input control vector.
(2) MMSE Matrix of the Estimation
ππ+1|π = π΄πππ΄π + π, (9)
where ππ is the MMSE matrix of the estimated π₯π.
(3) Kalman Filter Gain Matrix
πΎπ+1
= ππ+1|π (π»π+1)π (π π+1 + π»π+1ππ+1|π (π»π+1)
π)β1
,(10)
xk
nk
xk|kβ1
zk = xk β xk|kβ1 + nk
T
T
T
Kok
K1k
K0kzk +k
βi=0
K1izi
Figure 5: Kalman filter structure block diagram.
where π π+1 is the covariance matrix of the observation noiseand the measurement matrixπ»π+1 is a unit matrix.
(4) Correction
π₯π+1 = π₯π+1|π + πΎπ+1 (π§π+1 β π»π+1π₯π+1|π) . (11)
(5) MMSE Matrix
ππ+1 = (1 β πΎπ+1) ππ+1|π. (12)
After Kalman filtering, the correction is π₯π+1 = [ππ+1;πΎπ+1]π at the (π+1)th clock period. π’π+1 = π₯π+1 is set to make
up for the clock skew and clock offset. So the slave anchorβsclock base will make up to the same clock base when the tagβsdata arrives.
Relative to DPLL, we define ππ = [π₯π; π₯π] and definethe Kalman gain vector as πΎπ = [πΎ0π; πΎ1π]. π0 =[π20 /12 0; 0 π20π
2Ξπ], where π20 /12 is the variance of the
initial phase π0; πΈ[(π0)2] = π20π2Ξπ; π2Ξπ = πΈ[(πΞ/π0)2]
is the normalized variance values of πΞ with zero averagedistribution.The error is π§π = π₯πβπ₯π|πβ1+ππ = π¦πβπ»ππ|πβ1.
According to (4)β(7), as π = 0, 1, 2, . . ., we will get
π₯π+1 = π₯π + πΎ0ππ§ππ
βπ=0
πΎ1ππ§π. (13)
Comparing (5) and (13), the recursive types are verysimilar. The Kalman filter structure is depicted in Figure 5.
4. Comparison and Analysis
According to the above descriptions about Kalman filter andDPLL, we compare the two schemes for UWB indoor loca-tion. In DPLL, correction sequences as the output of thesignal through digital filtering control the digital clock perioduntil the loop is locked. Kalman filter also abstracts theneeded signal through the feedback loop, which uses theformer data to estimate the current data.The two schemes usethe error π§π through gain factorπΎ to find the optimal estima-tion. By comparing (5) and (13), we just need to adjust gainfactorπΎ so as to get the similar results.
We define the passive anchor clock variance error be-tween the real clock variance and the optimal estimated clock
4 Journal of Electrical and Computer Engineering
variance as ππ = π₯π β π₯π|πβ1. Using the reference-passiveanchors data backhaul sending time, data receiving time, andthe optimal estimated time with the data flight time, the loca-tion engine in the server will calculate the relative clock offsetvariance.
The paper uses Matlab for simulation. Assume that theanchorsβ coordinates are anchor1 (1.1, 1.17, 1.93) and anchor2(11.3, 1.17, 1.21). The TOF of the reference anchor1 to thepassive anchor2 is TOF1,2 = 0.000000034123193 s. Forsecond-order DPLL, variable loop gains with lower boundsπΎ0π = 0.2, πΎ1π = 0.05, πΈπ/π0 = 10.6 dB, π2π/π
20 = οΏ½οΏ½2π/π
20 =
0.001, and πΞ/π0 = 0.1. The clock synchronization periodis 150ms. The measurement noise variance is 3π β 12; theprocess noise variance is 5π β 12. Alternatively, a more com-plex multistage in-lock and out-of-lock detection algorithmmay be employed, which trades off acquisition, tracking,and false lock performance according to the system require-ments. Such tradeoff issues are beyond the scope of this paper[11, 12].
As Figure 6 shows, the green line is the clock variancedifference by Kalman filter and the black line is that by DPLL.They all tend to be stable over time, but the properties ofKalman 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 sufficientinformation for the DPLL to stay locked for continuedreal-time location system operation with good performance(including coping with a certain packet error/loss rate),we need to send the clock synchronization message morefrequently than forKalmanfilter. It reduces the air-occupancyneeded for clock synchronization messages, which allowsmore air-time for receiving blink messages. This essentiallyincreases the system tag capacity, especially in the lower datarate and longer preamble modes.
5. Improved Algorithms on Kalman Filter
As stated above, Kalman filter is better for clock synchroniza-tion indoor UWB location system. Its calculation is based onsuch an assumption: all measurements are composed of thereal signal and additive Gaussian noise. If these assumptionsare correct, Kalman filter will effectively get signal from themeasurements containing noise. But if the reference anchorβsclock check packets collide with tagβs data packets with TOAor some other mistake challenges in [13], the assumptionsare incorrect. Kalman filter will treat the collision or mis-take as credible clock variance data, and it calculates by thesedata. And Kalman filter itself is a kind of low-pass filter;its response and correcting speed are slower. Therefore, theerrors generated by the collision will for a long time seriouslydegrade the performance of the clock synchronization algo-rithm.
This paper proposes a method of monitoring and avoid-ing the wrong of collisions. Kalman filter gain is as (10) shows,defining an information matrix π½ as
π½ = (π π+1 + π»π+1ππ+1|π (π»π+1)π)β1
. (14)
π½ is used to represent the difference between estimated clockerror and actual clock error. This information will be used
Kalman filterDPLL
100 200 300 400 5000
Time (s)
β10
β8
β6
β4
β2
0
2
4
6
8
10
Erro
r (ns
)
Figure 6: The difference between estimated time and real time.
300 400 500100 2000
Time (s)
β60
β40
β20
0
20
40
60Er
ror (
ns)
Real clock offsetEstimated clock offset
Figure 7: The relative clock offset with big disturbance by Kalmanfilter.
to prompt how well the current input fits the current state offilter.
OMπ+1 = (π₯π+1 β π₯π+1) β π½ β (π₯π+1 β π₯π+1) . (15)
If the OM (outlier metric) rises above a preset thresholdwhich is an empirical value, the current input is untrusted.The improved Kalman filter does not update current state butdiscards this data directly to avoid error packet having a bigimpact for filter output.
In Figures 7 and 8, the blue lines are the real clock offsetsand the red lines are the estimated clock offset by Kalmanfilter. We set a big data mistake at 150 s; the estimated clockoffset is unable to keep pace with the real clock offset andup and down shocks with Kalman filter in Figure 7. With the
Journal of Electrical and Computer Engineering 5
Real clock offsetEstimated clock offset
100 200 300 400 5000
Time (s)
β60
β40
β20
0
20
40
60
Erro
r (ns
)
Figure 8:The relative clock offset with big disturbance by improvedKalman filter.
resolution of the trustless input, the estimated clock offset issmooth in Figure 8. By comparing Figures 7 and 8, it is clearlyseen that the improved Kalman filter enhances the capacity ofresisting disturbance.
6. Conclusion
We have compared DPLL and Kalman filter for UWB indoorlocation network clock synchronization, and the analysisresults show that Kalman filter copes better with clock errorsand has better lock performance. And the improved Kalmanfilter is more immune to interference as the simulation resultsshow.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
Acknowledgments
This work was supported in part by Major Research and De-velopment Plan of Hainan Province (ZDYF2016002), theNational Natural Science Foundation of China (61461017),Hainan Province Natural Science Foundation of InnovationTeam Project (2017CXTD004), and Innovative ResearchProject of Postgraduates in Hainan Province (Hyb2017-04).
References
[1] βStandard IEEE 802.15.4-2011. Part 15.4: Low-rate wireless per-sonal area networks (LR-WPANs),β September 2011.
[2] S. Gezici, βA survey on wireless position estimation,β WirelessPersonal Communications, vol. 44, no. 3, pp. 263β282, 2008.
[3] D. Dardari, A. Conti, U. Ferner, A. Giorgetti, and M. Z. Win,βRanging with ultrawide bandwidth signals in multipath envi-ronments,β Proceedings of the IEEE, vol. 97, no. 2, pp. 404β425,2009.
[4] D. Zachariah, S. Dwivedi, P. Handel, and P. Stoica, βScalable andPassive Wireless Network Clock Synchronization in LOS Envi-ronments,β IEEE Transactions onWireless Communications, vol.16, no. 6, pp. 3536β3546, 2017.
[5] Y. Wu, Q. Chaudhari, and E. Serpedin, βClock synchronizationof wireless sensor networks,β IEEE Signal Processing Magazine,vol. 28, no. 1, pp. 124β138, 2011.
[6] T.-D. Tran, J. Oliveira, J. Sa Silva et al., βA scalable localizationsystem for critical controlled wireless sensor networks,β inProceedings of the 2014 6th International Congress on UltraMod-ern Telecommunications and Control Systems and Workshops,ICUMT 2014, pp. 302β309, Russia, October 2014.
[7] C.-H. Shan, Z.-Z. Chen, and J.-X. Jiang, βAn all digital phase-locked loop system with high performance on wideband fre-quency tracking,β in Proceedings of the 2009 9th InternationalConference on Hybrid Intelligent Systems, HIS 2009, pp. 460β463, China, August 2009.
[8] S. Bhattacharyya, R. N. Ahmed, B. B. Purkayastha, and K.Bhattacharyya, βZero crossing DPLL based phase recoverysystem and its application in wireless communication,β inProceedings of the IEEE International Conference on Computer,Communication and Control, IC4 2015, India, September 2015.
[9] C. McElroy, D. Neirynck, and M. McLaughlin, βComparison ofwireless clock synchronization algorithms for indoor locationsystems,β in Proceedings of the 2014 IEEE International Con-ference on Communications Workshops, ICC 2014, pp. 157β162,Australia, June 2014.
[10] S. Y. Chen, βKalmanfilter for robot vision: a survey,β IEEETrans-actions on Industrial Electronics, vol. 59, no. 11, pp. 4409β4420,2012.
[11] G. A. Leonov, N. V. Kuznetsov,M.V. Yuldashev, andR. V. Yulda-shev, βHold-in, pull-in, and lock-in ranges of PLL circuits:Rigorous mathematical definitions and limitations of classicaltheory,β IEEE Transactions on Circuits and Systems I: RegularPapers, vol. 62, no. 10, pp. 2454β2464, 2015.
[12] F. Ren, C. Lin, and F. Liu, βSelf-correcting time synchronizationusing reference broadcast in wireless sensor network,β IEEEWireless Communications Magazine, vol. 15, no. 4, pp. 79β85,2008.
[13] H. Soganci, S. Gezici, and H. V. Poor, βAccurate positioning inultra-wideband systems,β IEEE Wireless Communications Mag-azine, vol. 18, no. 2, pp. 19β27, 2011.
International Journal of
AerospaceEngineeringHindawiwww.hindawi.com Volume 2018
RoboticsJournal of
Hindawiwww.hindawi.com Volume 2018
Hindawiwww.hindawi.com Volume 2018
Active and Passive Electronic Components
VLSI Design
Hindawiwww.hindawi.com Volume 2018
Hindawiwww.hindawi.com Volume 2018
Shock and Vibration
Hindawiwww.hindawi.com Volume 2018
Civil EngineeringAdvances in
Acoustics and VibrationAdvances in
Hindawiwww.hindawi.com Volume 2018
Hindawiwww.hindawi.com Volume 2018
Electrical and Computer Engineering
Journal of
Advances inOptoElectronics
Hindawiwww.hindawi.com
Volume 2018
Hindawi Publishing Corporation http://www.hindawi.com Volume 2013Hindawiwww.hindawi.com
The Scientific World Journal
Volume 2018
Control Scienceand Engineering
Journal of
Hindawiwww.hindawi.com Volume 2018
Hindawiwww.hindawi.com
Journal ofEngineeringVolume 2018
SensorsJournal of
Hindawiwww.hindawi.com Volume 2018
International Journal of
RotatingMachinery
Hindawiwww.hindawi.com Volume 2018
Modelling &Simulationin EngineeringHindawiwww.hindawi.com Volume 2018
Hindawiwww.hindawi.com Volume 2018
Chemical EngineeringInternational Journal of Antennas and
Propagation
International Journal of
Hindawiwww.hindawi.com Volume 2018
Hindawiwww.hindawi.com Volume 2018
Navigation and Observation
International Journal of
Hindawi
www.hindawi.com Volume 2018
Advances in
Multimedia
Submit your manuscripts atwww.hindawi.com