Improvements to Boundary Clock Based Time hronization through Cascaded Switches Sihai Wang Samsung Electronics sihai.wang@samsung.com
Outline Introduction to IEEE-1588 (PTP) hronization-capable Clock Improved Schemes Experimental and Simulated Results Conclusions 2
Basic Procedure of PTP Master Slave Master Slave Interval n-numbered (n-1)-numbered T1 T4 Follow up (T1) Delay request T2 T3 Delay response (T4) n-numbered Time Time Time Time Details of Election of grand master is not included here Toffset = [(T2 - T1) - (T4 - T3)] / 2 Frequency offset can be derived from Toffset (Scheme dependent) 3
PTP through Cascaded SWs Switch1 Local Clock Switch2 Local Clock S MA MA MA S MA MA MA GM S S S GM: Grand Master Device Time hronization MA: Master Agent Port Local Clock Update S: Slave Port or Device Local Clock Output Slave port maintains local clock (LC, should be sync-capable clock) The unique LC provides time info to all ports of a switch procedures of different hops are independent Error accumulation can be exponential vs. hop number [1] (depending on design of PLL control loop) 4
Outline Introduction to IEEE-1588 (PTP) hronization-capable Clock Improved Schemes Experimental and Simulated Results Conclusions 5
-Capable Clock (SCC) f FreqCompVal Register OffsetCompVal Register Local Oscillator Frequency Compensation Clock Counter Offset Compensation Time Frequency Compensation Value Offset Compensation Value Freq. and Offset are compensated by updating FreqCompVal and OffsetCompVal registers, respectively (see slides 8 10 for algorithm) Freq. compensation module is plotted equivalently here, and details are illustrated in [2] 6
Classification of SCC Offset&Freq. Compensation Clock (OFCC) Both offset&freq. compensation modules Both offset&freq. compensation abilities Freq.-only Compensation Clock (FCC) Only freq. compensation module Both offset&freq. compensation abilities [2] Offset-only Compensation Clock (OCC) Only offset compensation module Only offset compensation ability 7
OFCC Compensation FreqCompVal 0 = 1 FreqCompVal n = FreqScaleFactor n * FreqCompVal n-1 OffsetCompVal 0 = 0 OffsetCompVal n = OffsetCompVal n-1 Toffset n Toffset is given on slide 3 FreqScaleFactor 1 = 1 FreqScaleFactor n = T Int,n / (T Int,n + Toffset n ) T Int,n = synch interval (slide 3) This algorithm differs from the algorithm used in [3] and [4] in that The frequency scale factor here is calculated using the corrected (compensated) phase The frequency scale factor in [3] and [4] is calculated using the uncorrected (uncompensated) phase obtained from the free-running oscillator 8
FCC Compensation -- 1 FreqCompVal 0 = 1 FreqCompVal n = FreqScaleFactor n * FreqCompVal n-1 FreqScaleFactor n is obtained using algorithm of [2] (see section 3.0 of [2]) MasterClockCount n = MasterClockTime n MasterClockTime n-1 SlaveClockCount n = SlaveClockTime n SlaveClockTime n-1 ClockDiffCount n = MasterClockTime n SlaveClockTime n FreqScaleFactor n = (MasterClockCount n + ClockDiffCount n ) / SlaveClockCount n The frequency scale factor has 2 terms, which attempt to correct for 2 effects ClockDiffCount n / SlaveClockCount n corrects for the rate difference between master and slave MasterClockCount n / SlaveClockCount n tries to change the frequency to drive the phase error to zero over the next synch interval 9
FCC Compensation -- 2 In FCC compensation, offset is not directly compensated as in OFCC Rather, phase is obtained by integrating the compensated frequency The Toffset values are used to obtain the compensated frequency, as on the previous slide This is why the MasterClockCount term in the expression for FreqScaleFactor is necessary 10
Error Evolvement of the SCCs Error OFCC Time FCC Time OCC 0 1s 2s 3s 4s 5s Time OCC has the highest error, and will not be discussed OFCC and FCC can achieve equivalent precision 11
Outline Introduction to IEEE-1588 (PTP) hronization-capable Clock Improved Schemes Experimental and Simulated Results Conclusions 12
Conventional Cascaded Scheme Dev0 Dev1 Dev2 Dev3 Dev4 Dev5 GM S M S M S M S M S Time Independent (Locally determined) Start time of each sync process is determined locally (independent) No info exchange between different hops Hereafter, either OFCC or FCC can be used and both of them will be investigated 13
Improvement Common Description Dev0 Dev1 Dev2 Dev3 Dev4 Dev5 GM S M S M S M S M S As an example, if Dev1 knows its time synchronization status, i.e. what time it has the possible minimum error and/or its time error at a certain time, it can either start synchronization process to Dev2 while its time has the minimum error or send its synchronization error information to Dev2 to be compensated 14
Improvement (Using OFCC) Dev0 Dev1 Dev2 Dev3 Dev4 Dev5 GM S M S M S M S M S Time S Dev1, 2, 3 and 4 PreFin Dependent (Sequent) M Only and just after previous hop sync finished, next hop starts sync proc. So start time of sync process become sequent (dependent) by adding PreFin signal PreFin: Previous hronization Finished 15
Improvement (Using FCC) Dev0 Dev1 Dev2 Dev3 Dev4 Dev5 GM S M S M S M S M S Time S Dev1, 2, 3 and 4 PreFin FreqScaleFactor (FreqScaleFactor) Dependent (Sequent) M Only and just after previous hop sync finished, next hop starts sync proc. Besides PreFin, FreqScaleFactor is transferred to next hop device where it will be compensated FreqScaleFactor: Frequency Scaling Factor 16
Outline Introduction to IEEE-1588 (PTP) hronization-capable Clock Improved Schemes Experimental and Simulated Results Scheme using OFCC is verified by experiments Scheme using FCC is verified by simulations Conclusions 17
Simulation Setup (FCC) 8 chained devices (Dev0~7), Dev0 is GM Link speed: 100MHz Crystal Frequency: 50MHz Interval: 2^20ns (~1.049ms) In order to save simulation computing time Cycle Indicator (CI): 2^17ns (131.072µs) Relative to GM, Dev1~7 freq. deviations are: +50, +100, and +350ppm, respectively Simulated time: >250ms The same analysis method with that using OFCC Simulated time errors of CI are plotted in Appendix 18
Simulated Results (FCC) -- 1 Conventional Scheme Dev1 Dev2 Dev3 Dev4 Dev5 Dev6 Dev7 Std. Dev. (ns) 20.64 52.54 120.8 313.5 831.1 2244 6089 Pk-Pk (ns) 123 357 781 2118 5882 16909 45453 Improved Scheme Dev1 Dev2 Dev3 Dev4 Dev5 Dev6 Dev7 Std. Dev. (ns) 20.33 28.87 40.81 47.17 52.21 53.6 60.81 Pk-Pk (ns) 123 208 266 336 341 372 458 19
Simulated Results (FCC) -- 2 Std. Dev. (ns) 7000 6000 5000 4000 3000 2000 1000 0 Conventional method Improved method 1 2 3 4 5 6 7 Cascaded Hop Number Pk-Pk Value (ns) 50000 40000 30000 20000 10000 0 Conventional method Improved method 1 2 3 4 5 6 7 Cascaded Hop Number Std. Dev. (Pk-Pk) vs. Hop Number Exponential Linearly 20
Simulated Results (FCC) -- 3 Unfiltered Phase Variation MTIE for FCC Conventional Method MTIE (ns) 1e+5 1e+4 1e+3 1e+2 1e+1 dev1 dev2 dev3 dev4 dev5 dev6 dev7 Uncompressed SDTV Mask Uncompressed HDTV Mask Digital Audio, Consumer Interface Mask Digital Audio, Professional Interface Mask MPEG-2, After Network Transport, Mask MPEG-2, Before Network Transport, Mask 1e+0 1e-1 1e-5 1e-4 1e-3 1e-2 1e-1 1e+0 Observation Interval (s) 21
Simulated Results (FCC) -- 4 Unfiltered Phase Variation MTIE for FCC Improved Method MTIE (ns) 1e+5 1e+4 1e+3 1e+2 1e+1 dev1 dev2 dev3 dev4 dev5 dev6 dev7 Uncompressed SDTV Mask Uncompressed HDTV Mask Digital Audio, Consumer Interface Mask Digital Audio, Professional Interface Mask MPEG-2, After Network Transport, Mask MPEG-2, Before Network Transport, Mask 1e+0 1e-1 1e-5 1e-4 1e-3 1e-2 1e-1 1e+0 Observation Interval (s) 22
Simulated Results (FCC) -- 5 Filtered Phase Variation MTIE for FCC Conventional Method Filter BW = 10 Hz Filter gain peaking = 0.1 db MTIE (ns) 1e+5 1e+4 1e+3 1e+2 1e+1 dev1 dev2 dev3 dev4 dev5 dev6 dev7 Uncompressed SDTV Mask Uncompressed HDTV Mask Digital Audio, Consumer Interface Mask Digital Audio, Professional Interface Mask MPEG-2, After Network Transport, Mask MPEG-2, Before Network Transport, Mask 1e+0 1e-1 1e-5 1e-4 1e-3 1e-2 1e-1 1e+0 Observation Interval (s) 23
Simulated Results (FCC) -- 6 Filtered Phase Variation MTIE for FCC Improved Method Filter BW = 10 Hz Filter gain peaking = 0.1 db MTIE (ns) 1e+5 1e+4 1e+3 1e+2 1e+1 dev1 dev2 dev3 dev4 dev5 dev6 dev7 Uncompressed SDTV Mask Uncompressed HDTV Mask Digital Audio, Consumer Interface Mask Digital Audio, Professional Interface Mask MPEG-2, After Network Transport, Mask MPEG-2, Before Network Transport, Mask 1e+0 1e-1 1e-5 1e-4 1e-3 1e-2 1e-1 1e+0 Observation Interval (s) 24
Simulated Results (FCC) -- 7 Filtered Phase Variation MTIE for FCC Conventional Method Filter BW = 1 Hz Filter gain peaking = 0.1 db MTIE (ns) 1e+6 1e+5 1e+4 1e+3 1e+2 1e+1 dev1 dev2 dev3 dev4 dev5 dev6 dev7 Uncompressed SDTV Mask Uncompressed HDTV Mask Digital Audio, Consumer Interface Mask Digital Audio, Professional Interface Mask MPEG-2, After Network Transport, Mask MPEG-2, Before Network Transport, Mask 1e+0 1e-1 1e-2 1e-5 1e-4 1e-3 1e-2 1e-1 1e+0 Observation Interval (s) 25
Simulated Results (FCC) -- 8 Filtered Phase Variation MTIE for FCC Improved Method Filter BW = 1 Hz Filter gain peaking = 0.1 db MTIE (ns) 1e+6 1e+5 1e+4 1e+3 1e+2 1e+1 dev1 dev2 dev3 dev4 dev5 dev6 dev7 Uncompressed SDTV Mask Uncompressed HDTV Mask Digital Audio, Consumer Interface Mask Digital Audio, Professional Interface Mask MPEG-2, After Network Transport, Mask MPEG-2, Before Network Transport, Mask 1e+0 1e-1 1e-2 1e-5 1e-4 1e-3 1e-2 1e-1 1e+0 Observation Interval (s) 26
Experimental Setup (OFCC) 6 chained devices (Dev0~5), Dev0 is GM Link speed: 100MHz Crystal Frequency: 50MHz Interval: 2^30ns (~1.074s) Cycle Indicator (CI): 2^17ns (131.072µs) Test Time: >1hour CIs of GM and individual slave are monitored and recorded for sync precision examination 27
Experimental Result Check Method Statistical results of slave CI Std. Dev. and Pk-Pk values are recorded Slave CI Dev1~5, respectively GM CI 1. Both conventional and improved schemes are performed 2. All slave CIs relative with GM CI are analyzed 28
Experimental Results (OFCC) -- 1 Conventional Scheme Dev1 Dev2 Dev3 Dev4 Dev5 Std. Dev. (ns) 19.12 49.99 129.4 392.8 1094 Pk-Pk (ns) 177 416 1264 3160 8840 Improved Scheme Dev1 Dev2 Dev3 Dev4 Dev5 Std. Dev. (ns) 18.27 24.3 28.41 33.01 38.84 Pk-Pk (ns) 198 230 260 352 420 29
Experimental Results (OFCC) -- 2 1200 9000 Std. Dev. (ns) 900 600 300 Conventional Scheme Improved Scheme Pk-Pk Value (ns) 6000 3000 Conventional Scheme Improved Scheme 0 1 2 3 4 5 Cascaded Hop Number 0 1 2 3 4 5 Cascaded Hop Number Std. Dev. (Pk-Pk) vs. Hop Number Exponential Linearly 30
Conclusions Proposed Improvements Sequent and hop by hop time synchronization order from grand master to slaves Transferring necessary sync parameter to following hop device to be compensated Results error through cascaded switches increases linearly, instead of exponentially, with cascaded hop number increasing error after 5 hops has ~500ns pk-pk value (may <1µs after 7 hops) with 1s sync interval 31
References -- 1 1. J. Jasperneite, K. Shehab, and K. Weber, "Enhancements to the Time hronization Standard IEEE-1588 for a System of Cascaded Bridges," in 5 th IEEE International Workshop on Factory Communication Systems (WFCS'2004), pp. 239-244 2. S. Balasubramanian, K.R. Harris, and A. Moldovansky, "A frequency compensated clock for precision synchronization using IEEE 1588 protocol and its application to Ethernet," Workshop on IEEE 1588, 2003 32
References -- 2 3. Residential Ethernet (RE) (a working paper), Draft 0.136, maintained by David V. James and based on work by him and other contributors, August 10, 2005. Available via http://www.ieee802.org/3/re_study/public/index.html 4. Geoffrey M. Garner and Kees den Hollander, Analysis of Clock hronization Approaches for Residential Ethernet, Samsung presentation at September, 2005 Joint IEEE 802.1/802.3 ResE SG meeting, San Jose, CA, September 29, 2005. Available via http://www.ieee802.org/3/re_study/public/index.html. 33
Appendix Simulated CI Time Error Dev2 Dev1 CI Time Error (ns) CI Time Error (ns) 200 100 0-100 -200 0 40 80 120 160 200 240 280 Time (ms) 80 40 0-40 * Conventional Scheme Using FCC -80 0 40 80 120 160 200 240 280 Time (ms) 34
Appendix Simulated CI Time Error Dev4 Dev3 CI Time Error (ns) CI Time Error (ns) 1000 500 0-500 -1000 0 40 80 120 160 200 240 280 Time (ms) 400 200 0-200 -400 0 40 80 120 160 200 240 280 * Conventional Scheme Using FCC Time (ms) 35
Appendix Simulated CI Time Error Dev6 Dev5 CI Time Error (ns) CI Time Error (ns) 8000 4000 0-4000 -8000 0 40 80 120 160 200 240 280 Time (ns) 3000 1500 0-1500 -3000 0 40 80 120 160 200 240 280 * Conventional Scheme Using FCC Time (ms) 36
Appendix Simulated CI Time Error Dev7 25000 CI Time Error (ns) 12500 0-12500 -25000 0 40 80 120 160 200 240 280 Time (ms) * Conventional Scheme Using FCC 37
Appendix Simulated CI Time Error Dev2 Dev1 CI Time Error (ns) CI Time Error (ns) * Improved Scheme Using FCC 120 60 0-60 -120 0 40 80 120 160 200 240 280 320 360 400 440 Time (ms) 80 40 0-40 -80 0 40 80 120 160 200 240 280 320 360 400 440 Time (ms) 38
Appendix Simulated CI Time Error Dev4 Dev3 CI Time Error (ns) CI Time Error (ns) * Improved Scheme Using FCC 200 100 0-100 -200 0 40 80 120 160 200 240 280 320 360 400 440 Time (ms) 160 80 0-80 -160 0 40 80 120 160 200 240 280 320 360 400 440 Time (ms) 39
Appendix Simulated CI Time Error Dev6 Dev5 CI Time Error (ns) CI Time Error (ns) * Improved Scheme Using FCC 240 120 0-120 -240 0 40 80 120 160 200 240 280 320 360 400 440 Time (ms) 200 100 0-100 -200 0 40 80 120 160 200 240 280 320 360 400 440 Time (ns) 40
Appendix Simulated CI Time Error Dev7 280 CI Time Error (ns) 140 0-140 -280 0 40 80 120 160 200 240 280 320 360 400 440 Time (ms) * Improved Scheme Using FCC 41