jun 2003 eid son
DESCRIPTION
IEEE 1588 tutorialTRANSCRIPT
John EidsonJuly 16, [email protected]
IEEE-1588 Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems
I&M Society IEEE1588 July 16,, 2003
Page 2
Overview
•Objectives of 1588
•A bit of history
•Where is it being used?
•Comparison with other protocols
•What the 1588 standard defines
•Technical overview
•Prototype results
I&M Society IEEE1588 July 16,, 2003
Page 3
Objectives of 1588
• Sub-microsecond synchronization of real-time clocks in components of a networked distributed measurement and control system
• Intended for relatively localized systems typical of industrial automation and test and measurement environments.
• Applicable to local areas networks supporting multicast communications (including but not limited to Ethernet)
I&M Society IEEE1588 July 16,, 2003
Page 4
•Simple, administration free installation
•Support heterogeneous systems of clocks with varying precision, resolution and stability
•Minimal resource requirements on networks and host components.
Objectives of 1588 (continued)
I&M Society IEEE1588 July 16,, 2003
Page 5
A bit of History
Status of IEEE 1588
•Approved by the IEEE-SA Review Committee on 12 Sept. 2002
•Published on November 8 2002
•Available from the IEEE http://standards.ieee.org
I&M Society IEEE1588 July 16,, 2003
Page 6
Members of the IEEE-1588 working groupVolker Arlt-Lenze AG
Scott Carter-GE Medical
John Eidson-Agilent
Richard Hambly-CNS Systems
Bruce Hamilton-Agilent
Steve Jennings-Bosch-Rexroth
Robert Johnson-Telemonitor
Bill Kneifel-KUKA
Jurgen Knopke-Lenze
Kang Lee- NIST
Judah Levine-NIST
Anatoly Moldovansky-Rockwell
Ed Powers-Naval Observatory
Jim Read-Hyperfine
Richard Schmidt-Naval Observatory
Steve Smith-ORNL
Joe White-NRL
Stan Woods-Agilent
I&M Society IEEE1588 July 16,, 2003
Page 7
Where is it being used?(presentations scheduled for Sept. 24 workshop)
NETWORK DEVICES:
IEEE 1588 and Network Devices: Dirk S. Mohl, Hirschmann Electronics
Boundary Clock implementation: Øyvind Holmeide, Managing Director, OnTime Networks AS.
Extending IEEE 1588 to fault tolerant synchronization with a worst-case precision in the 100 ns range: Nikoaus E. Keroe, Oregano Systems
I&M Society IEEE1588 July 16,, 2003
Page 8
I&M Society IEEE1588 July 16,, 2003
Page 9
Where is it being used?(presentations scheduled for Sept. 24 workshop)
TELECOMMUNICATIONS:
Proposal for IEEE1588 use over Metro Ethernet Layer 2 VPNs: Glenn Algie, Senior Advisor, Wireless Technology Labs, Nortel Networks
INDUSTRIAL AUTOMATION:
Impact of Switch Cascading on Time Accuracy: Prof. Thomas Mueller, University Wintherthur, Suisse, Karl Weber, SIEMENS Automation and Drives
Consequences of Redundant Structures PTP: Ludwig Winkel, SIEMENS Automation and Drives
Application of 1588 for Distributed Motion Control: Kendal R. Harris, Sivaram Balasubramanian and Anatoly Moldovansky, Rockwell Automation
I&M Society IEEE1588 July 16,, 2003
Page 10
HZx Wrappers
Courtesy of SIG Pack Systems AG
I&M Society IEEE1588 July 16,, 2003
Page 11
Control of multiple robots
I&M Society IEEE1588 July 16,, 2003
Page 12
Mulit-stand Printing Press
60mph =
1 inch/millisecond =
1 mil/microsecond
I&M Society IEEE1588 July 16,, 2003
Page 13
Where is it being used?(presentations scheduled for Sept. 24 workshop)
MILITARY FLIGHT TEST:
Time Correlation using network based data acquisition on-board a Military Test Vehicle: Jiwang Dai, Ph.D, Senior Software Engineer, L3 Communications Telemetry East, Thomas DeSelms, Senior Network Systems Engineer, Veridian Engineering, and Edward Grozalis, Senior Engineer, L3 Communications Telemetry East
POWER SYSTEMS:
Implementation of IEEE Std.-1588 in a Networked I/O Node: Mark Shepard, GE Drives & Controls, Inc., Salem, VA
I&M Society IEEE1588 July 16,, 2003
Page 14
I&M Society IEEE1588 July 16,, 2003
Page 15
Comparison with other protocols
1588: Target is groups of relatively stable components, locally networked (a few subnets), cooperating on a set of well defined tasks.
NTP: (Network Time Protocol, RFC 1305). Target is autonomous systems widely dispersed on the Internet.
GPS: (Satellite based Global Positioning System of the US Department of Defense): Target is autonomous, widely dispersed systems.
TTP(www.ttpforum.org), SERCOS (IEC 61491): Target is tightly integrated, usually bus or specialized TDMA network based closed systems.
I&M Society IEEE1588 July 16,, 2003
Page 16
ModerateModerateModerate computation footprint
Moderate network and computation footprint
Small network message and computation footprint
Resources
Master/SlaveDistributedClient/serverPeer ensemble
Master/slaveStyle
Sub-microsecond
Sub-microsecond
Sub-microsecond
Few milliseconds
Sub-microsecond
Target accuracy
BusBus or starSatelliteInternetNetworkCommuni-cations
Local busLocal busWide areaWide areaA few subnetsSpatial extent
SERCOSTTPGPSNTP1588
I&M Society IEEE1588 July 16,, 2003
Page 17
Every TDMA cycle, ~ms
Yes
Configured
No
No
SERCOS
Every TDMA cycle, ~ms
~1 second
Varies, nominally seconds
~2 secondsUpdate interval
YesRF receiver and processor
NoFor highest accuracy
Hardware?
ConfiguredN/AConfiguredSelf organizing
Administration
NoNoYesNoProtocol specifies security
ConfiguredYesYesYesLatency correction
TTPGPSNTP1588
I&M Society IEEE1588 July 16,, 2003
Page 18
1588 Defines:
•Descriptors characterizing a clock
•The states of a clock and the allowed state transitions
•1588 network messages, fields, and semantics
•Datasets maintained by each clock
•Actions and timing for all 1588 network and internal events
I&M Society IEEE1588 July 16,, 2003
Page 19
•Critical physical specifications
•A suite of messages for monitoring the system
•Specifications for an Ethernet based implementation
•Conformance requirements
•Implementation suggestions
I&M Society IEEE1588 July 16,, 2003
Page 20
Timing Latency & Fluctuation
msecs of delay and fluctuation
Application layer
Network protocol stack
Physical layer < 100 nsecs of delay and fluctuation
Application layer
Network protocol stack
Physical layer
Repeater, Switch, or
RouterRepeaters & Switches:fluctuations ~100ns to usecRouters:fluctuations ~ms
I&M Society IEEE1588 July 16,, 2003
Page 21
Reducing Timing Latency & Fluctuation
• Within a node:
• Make timing measurements as close to the physical layer as possible to eliminate protocol stack and operating system fluctuations.
• Use statistical techniques to further reduce residual fluctuations from PHY layer, network and repeaters and switches.
• Routers:
• Use transfer devices (1588 boundary clocks) to reduce router latency and fluctuations
I&M Society IEEE1588 July 16,, 2003
Page 22
Selecting a Master Clock-Single Subnet
Repeater or
Switch
Repeater or
Switch
Typical slave clock
Master clock
Self-configuring based on clock characteristics
• Information contained in ‘Sync’ messages
• All clocks run an identical ‘Best Master Clock’ algorithm
=1588 code & hardware
I&M Society IEEE1588 July 16,, 2003
Page 23
1588 Characterization of Clocks
• Based on primary source of time, e.g. GPS, local oscillator…
• Accuracy
• Variance
• Preferred set membership
• Type: Boundary clock (spans subnets) or ordinary clock
• UUID
I&M Society IEEE1588 July 16,, 2003
Page 24
1588 Timing Related Messages
•Multicast only within a subnet
•Four types of timing messages: Sync, Follow_Up, Delay_Req, Delay_Resp
•Issuing and response to these messages dependent on the ‘state’ of each clock
I&M Society IEEE1588 July 16,, 2003
Page 25
Detection of Sync messages
Application layer
Network protocol stack
Optional Sync and
Delay_Req message detector
Physical layer
e.g. MII interface in Ethernet
I&M Society IEEE1588 July 16,, 2003
Page 26
IEEE-1588 Code
Network protocol stack & OS
Physical layer
msecs of delay and fluctuation
< 100 nsecs of delay and fluctuation
Repeater, Switch, or
RouterRepeaters & Switches: ~100ns to usecRouters: ~ms
Sync detector & timestamp
generator
Master clock sends:
1. Sync message
2. Follow_up message
I&M Society IEEE1588 July 16,, 2003
Page 27
1588 SynchronizationStep 1:• Sync message sent from
master to slaves• All Sync message
detectors (SMD) note the time on the local clock this message appears at the SMD
• Step 2:• Follow-Up message
containing precise sending time sent from master to slaves
• All slaves compute offset and correct their clock
uProcessor-Aestimated sending time = 9:59.99AM
precise sending time = 10:00AM
SMD-Ameasures Sync message
precise sending time = 10:00AM
Master Clock
uProcessor-Bestimated sending time = 9:59.99AM
receipt time = 10:05AM
SMD-Bmeasures Sync messagereceipt time = 10:05AM
Slave Clock
Sync messageestimated sending time = 9:59.99AM
network
uProcessor-Aprecise sending time =
10:00AM
SMD-A
Master Clock
uProcessor-Bestimated sending time = 9:59.99AM
precise sending time = 10:00AMreceipt time = 10:05AM
SMD-B
Slave Clock
Follow_Up messageprecise sending time = 10:00AM
network
Clockcorrection
circuits
Clock
0:05
I&M Society IEEE1588 July 16,, 2003
Page 28
Synchronization computation
offset = receipt time – precise sending time –one way delay (for a Sync message)
one way delay = {master to slave delay + slave to master delay}/2 (assumes symmetric delay)
master to slave delay = receipt time – precise sending time (for a Sync message)
slave to master delay = Delay_Req receipt time -precise sending time (of a Delay_Req message)
I&M Society IEEE1588 July 16,, 2003
Page 29
Sync messages:
• Issued by clocks in the ‘Master’ state
• Contain clock characterization information
• Contain a estimate of the sending time
• When received by a slave clock the receipt time is noted
• Can be distinguished from other legal messages on the network
• For best accuracy these messages can be easily identified and detected at or near the physical layer and the precise sending (or receipt) time recorded
I&M Society IEEE1588 July 16,, 2003
Page 30
Follow_Up messages:
• Issued by clocks in the ‘Master’ state
• Always associated with the preceding Sync message
• Contain the ‘precise sending time’ as measured as close as possible to the physical layer of the network
• When received by a slave clock the ‘precise sending time’ is is used in computations rather than the estimated sending time contained in the Sync message
I&M Society IEEE1588 July 16,, 2003
Page 31
Delay_Req messages:
• Issued by clocks in the ‘Slave’ state
• When received by the master clock the receipt time is noted
• The slave measures and records the sending time
• Can be distinguished from other legal messages on the network
• For best accuracy these messages can be easily identified and detected at or near the physical layer and the precise sending (or receipt) time recorded
I&M Society IEEE1588 July 16,, 2003
Page 32
Delay_Resp messages:
• Issued by clocks in the ‘Master’ state
• Always associated with a preceding Delay_Req message from as specific slave clock
• Contain the receipt time of the associated Delay_Req message
• When received by a slave clock the receipt time is noted and used in conjunction with the sending time of the associated Delay_Req message as part of the latency calculation
I&M Society IEEE1588 July 16,, 2003
Page 33
1588 Multiple Subnet Topology
Repeater or
Switch
GPS
Repeater or
Switch
Repeater or
Switch
Repeater or
Switch
Grand Master Clock
Typical Slave Clock
Only Slave Port of Boundary Clock
Typical Master Port of Boundary Clock
=1588 code & hardware
Boundaryclock
Router
I&M Society IEEE1588 July 16,, 2003
Page 34
Multiple Subnet Synchronization &Master Clock Selection
• Boundary clocks do NOT pass Sync, Follow_Up, Delay_Req, or Delay_Resp messages
• Within a subnet a port of a boundary clock acts just like an ordinary clock with respect to synchronization and best master clock algorithm
• The boundary clock internally selects the port that sees the ‘best clock’ as the single slave port. This port is a slave in the selected subnet. All other ports of the boundary clock internally synchronize to this slave port.
I&M Society IEEE1588 July 16,, 2003
Page 35
•Boundary clocks define a parent-child hierarchy of master-slave clocks.
•The best clock in the system is the Grand Master clock.
•If there are cyclic paths in the network topology the best master clock algorithm reduces the logical topology to an acyclic graph.
I&M Society IEEE1588 July 16,, 2003
Page 36
1588 Management Messages
•Management messages are multicast ONLY within a subnet.
•Boundary clocks, not routers, transfer management messages between subnets.
•Management messages allow appropriate query and update of selected database information maintained by each clock.
I&M Society IEEE1588 July 16,, 2003
Page 37
1588 Time Scales
• The time base in a 1588 system is the time base of the Grand Master Clock. All other clocks synchronize (perhaps via boundary clocks) to the grand master.
• The Grand Master Clock time base is implementation dependent.
• If the Grand Master Clock maintains a UTC time base, the 1588 protocol distributes the appropriate leap second information to the slaves.
I&M Society IEEE1588 July 16,, 2003
Page 38
Basic Uses of Explicit Time in Measurement and Control
Time stamping (relative or absolute)
• Time stamping system events for debugging
• Time stamping data to allow correlation with other data or events
Coordination of measurement: (sampling and triggering)
Coordination of action (time based behaviors)
• Timed execution scripts
• Temporal mutual exclusion: (time slots)
I&M Society IEEE1588 July 16,, 2003
Page 39
Measurement setup to test prototypes of an earlier version of 1588
Clock-A Clock-B
Agilent 5372AF&T Analyzer
1 PPS signal
1-4 Ethernet repeaters
Agilent Technologies prototype clock
I&M Society IEEE1588 July 16,, 2003
Page 40
Allan frequency deviations for test oscillators
10-1
100
101
102
103
10410
-12
10 -11
10-10
10-9
10 -8
10-7
Averaging Time, seconds
Alla
n D
evia
tion
CTS CB3LV
10811D
I&M Society IEEE1588 July 16,, 2003
Page 41
Switch Connection
Inexpensive oscillator, fast loop
0
10
20
30
40
50
60
70
-49
0
-42
0
-35
0
-28
0
-21
0
-14
0
-70 0 70
14
0
21
0
28
0
35
0
Offset-nanoseconds
Fre
qu
en
cy
10811D, fast loop
0
10
20
30
40
50
60
70
-46
0
-39
5
-33
0
-26
5
-20
0
-13
5
-70 -5 60
12
5
19
0
25
5
32
0
38
5
Offset-nanoseconds
Fre
qu
en
cy
Inexpensive oscillator, slow loop
0
20
40
60
80
-390
-325
-260
-195
-130 -65 0 65 130
195
260
325
390
Offset-nanoseconds
Fre
qu
ency
10811D, slow loop
0
20
40
60
80
100
-26
0
-21
0
-16
0
-11
0
-60
-10
40
90
14
0
19
0
24
0
29
0
34
0
Offset-nanoseconds
Fre
qu
en
cy
s = 138 ns
s = 92 ns
s = 140 ns
s = 123 ns
I&M Society IEEE1588 July 16,, 2003
Page 42
Repeater ConnectionInexpensive oscillator, fast loop
0
20
40
60
80
100
120
-235
-200
-165
-130 -95
-60
-25
10 45 80 11
5
15
0
18
5
Offset-nanoseconds
Fre
qu
en
cy
10811D, fast loop
0
50
100
150
200
-150
-12
5
-10
0
-75
-50
-25 0 25
50
75
10
0
12
5
Offset-nanoseconds
Fre
qu
en
cy
10811D, slow loop
0
50
100
150
200
250
300
-22
0
-18
5
-15
0
-11
5
-80
-45
-10
25
60
95
13
0
16
5
20
0
Offset-nanoseconds
Fre
qu
en
cy
Inexpensive oscillator, slow loop
020406080
100120
-30
0
-25
5
-21
0
-16
5
-12
0
-75
-30
15
60
10
5
15
0
19
5
24
0
Offset-nanoseconds
Fre
qu
en
cy
s = 46 ns
s = 42 ns
s = 75 ns
s = 80 ns
I&M Society IEEE1588 July 16,, 2003
Page 43
Direct Connection
10811D, fast loop
050
100150200250
-80 -65 -50 -35 -20 -5 10 25 40 55 70More
Offset-nanoseconds
Freq
uenc
y
Inexpensive oscillator, fast loop
0
50100150200
250
-145
-125
-105 -85 -65 -45 -25 -5 15 35 55 75
Offset-nanoseconds
Freq
uenc
y
Inexpensive oscillator, slow loop
0
20
40
60
80
100
120
140
-32
0
-270
-22
0
-17
0
-120 -7
0
-20
30 80 13
0
18
0
23
0
Offset- nanoseconds
Fre
qu
en
cy
1 0 8 1 1 D , s l o w l o o p
0
1 0 0
2 0 0
3 0 0
4 0 0
5 0 0
6 0 0
-35
-25
-15 -5 5 15 25 35 45
O f f s e t - n a n o s e c o n d s
Fre
qu
en
cy
s = 39 ns
s = 15 ns
s = 34 ns
s = 76 ns
I&M Society IEEE1588 July 16,, 2003
Page 44
Seconds tick deviations: connection via a repeater
I&M Society IEEE1588 July 16,, 2003
Page 45
Seconds tick deviations: connection via a repeater
nanoseconds
I&M Society IEEE1588 July 16,, 2003
Page 46
For further information:
John Eidson, chair 1588 committee, [email protected]
September 24, 2003 IEEE1588 Workshop
http://ieee1588.nist.gov