21
1 EECS-149 April 29, 2009 Network Time Synchronization with IEEE 1588 (Time Distribution in Embedded Systems) John C. Eidson [email protected] Office 545Q Cory Hall (Tuesdays and Fridays) EECS-149 Slide 2 April 29, 2009 Agenda 1. Major time distribution systems used in embedded systems 2. How, where and why they are used 3. Application examples 4. Time distribution- in particular IEEE 1588- as an embedded system

Network Time Synchronization with IEEE 1588 - Chess

  • Upload
    others

  • View
    16

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Network Time Synchronization with IEEE 1588 - Chess

1

EECS-149

April 29, 2009

Network Time Synchronization with IEEE 1588

(Time Distribution in Embedded Systems)

John C. [email protected]

Office 545Q Cory Hall (Tuesdays and Fridays)

EECS-149

Slide 2 April 29, 2009

Agenda

1. Major time distribution systems used in embedded systems

2. How, where and why they are used

3. Application examples

4. Time distribution- in particular IEEE 1588- as an embedded system

Page 2: Network Time Synchronization with IEEE 1588 - Chess

2

EECS-149

Slide 3 April 29, 2009

Major time distribution systems used in embedded systems

1. NTP- c <1985, ~10ms

2. GPS- c 1972, operational in 1993,~100ns: (Glonass, Galileo )

3. IRIG-B- c 1960, ~1-10 us

4. IEEE 1588-2008 – c 2002, ~20ns on Ethernet

5. Proprietary or controlled protocols, e.g. FlexRay(c ~2000),

TTP(c ~1993), TTE(c ~2005)…

EECS-149

Slide 4 April 29, 2009

Purpose of IEEE 1588

NETWORK

IEEE 1588 is a protocol designed to synchronize real-time

clocks in the nodes of a distributed system that communicate

using a network

• It does not say how to use these clocks (this is specified by the respective

application areas)

Page 3: Network Time Synchronization with IEEE 1588 - Chess

3

EECS-149

Slide 5 April 29, 2009

Coupling IEEE 1588 to your application(This is your job- the standard has no opinion on how it is used)

IE E E 1 5 8 8 C lo c k

L a tc htr ig g e r- in

t im e s ta m pg e n e ra t in g t im e s ta m p s

IE E E 1 5 8 8 C lo c k

C o m p a ra to r tr ig g e r-o u t

e v e n t t im e g e n e ra t in g e v e n ts

L a tc h

IE E E 1 5 8 8 C lo c k S yn th e s iz e r w a v e fo rm

g e n e ra t in g w a v e fo rm s

EECS-149

Slide 6 April 29, 2009

Where is IEEE 1588 being (or likely to be used)?

1. Power generation (>50K nodes in service)

2. Industrial automation (esp. motion control)

3. Telecom (cellular backhaul initially- already field installations)

4. Audio visual systems (as IEEE 802.1AS a specialization of

1588)

5. Military, aerospace, instrumentation (flight qualification, surveillance, data acquisition)

6. Other nascent applications

Page 4: Network Time Synchronization with IEEE 1588 - Chess

4

EECS-149

Slide 7 April 29, 2009

RoboTeam in Action: Process Relative Motion

Courtesy of Kuka Robotics

Corp.

EECS-149

Slide 8 April 29, 2009

e.g. high speed printing Courtesy of Bosch-Rexroth.

60 mph ~= 0.001 in/us

Page 5: Network Time Synchronization with IEEE 1588 - Chess

5

EECS-149

Slide 9 April 29, 2009

IEEE 1588 enabled flight test instrumentation in the forward fuselage of a test aircraft. (Data acquisition)

Courtesy of Teletronics

EECS-149

Slide 10 April 29, 2009

Cellular backhaul is the major telecom application to date. Metro-

Ethernet in field trial. Femtocells beginning.

Companies involved (partial list):

• Nokia-Siemens, Brilliant, Semtech, Zarlink, …

Telecommunications Applications

Page 6: Network Time Synchronization with IEEE 1588 - Chess

6

EECS-149

Slide 11 April 29, 2009

IEEE Power System Relaying Committee (PSRC) recently approved formation

of Working Group H7 "IEEE 1588 Profile for Protection Applications"

Power System Applications

EECS-149

Slide 12 April 29, 2009

GE uses 1588 in the Mark™VIe control system for large generators, turbines, wind farms, and other DCS applications. (>50K I/O Packs with 1588 shipped to date)

http://gepower.com/prod_serv/products/oc/en/control_solution/ppc_markviedcs_cs.htm

Power System Applications (Courtesy of General Electric)

Page 7: Network Time Synchronization with IEEE 1588 - Chess

7

EECS-149

Slide 13 April 29, 2009

GE Prior Architecture- Centralized

Issues:

1. Signal conditioning

problems

2. Inflexible, hard to

expand

3. Backplane bandwidth

limitations

4. BUT! Customers were

familiar with the architecture

EECS-149

Slide 14 April 29, 2009

GE New Architecture- Distributed

Issues:

1. SOLVED-Signal

conditioning problems

2. SOLVED-Inflexible,

hard to expand

3. SOLVED-Backplane

bandwidth limitations

4. BUT! Customers were

unfamiliar with the architecture

Page 8: Network Time Synchronization with IEEE 1588 - Chess

8

EECS-149

Slide 15 April 29, 2009

GE New Overall Architecture- Distributed

EECS-149

Slide 16 April 29, 2009

PC Paced Instrument Sequencing-frequency response

*TRG; *OPC?

DONE

HW Trigger

HW Trigger*TRG; *OPC?

DONE

Page 9: Network Time Synchronization with IEEE 1588 - Chess

9

EECS-149

Slide 17 April 29, 2009

Instrument Sequencing by PC (Baseline)

Irregular signal timing due

to timing jitter in PC

EECS-149

Slide 18 April 29, 2009

Peer-to-Peer Instrument Sequencing

MEASURE

STEP

COMPLETE

STEP

MEASURE

Page 10: Network Time Synchronization with IEEE 1588 - Chess

10

EECS-149

Slide 19 April 29, 2009

Instrument Sequencing by P2P Messages

More regular signal timing

EECS-149

Slide 20 April 29, 2009

LXI Class B: Time-Triggered Instrument Sequencing

COMPLETE

TT

TT

TT

TT

TT

TT

TT

TT

Time overlap

Page 11: Network Time Synchronization with IEEE 1588 - Chess

11

EECS-149

Slide 21 April 29, 2009

Instrument Sequencing by Time-Triggers

Shorter interval due to overlap

EECS-149

Slide 22 April 29, 2009

Sequencing to measure frequency response

Page 12: Network Time Synchronization with IEEE 1588 - Chess

12

EECS-149

Slide 23 April 29, 2009

How does IEEE 1588 Work?

The IEEE 1588 protocol is:

1. Self- assembling

2. Completely distributed

3. Based on the exchange of well defined network messages.

There are two phases of the protocol:

1. Initialization (or reconfiguration): Create a master-slave hierarchy with the ‘best’ or a ‘designated’ clock- the

grandmaster- at the root of the tree.

2. Each slave then repeatedly synchronizes to its master.

EECS-149

Slide 24 April 29, 2009

Initialization or reconfiguration of the master-slave hierarchy.

Page 13: Network Time Synchronization with IEEE 1588 - Chess

13

EECS-149

Slide 25 April 29, 2009

Initialization or reconfiguration of the master-slave hierarchy.

EECS-149

Slide 26 April 29, 2009

Initialization or

reconfiguration of the master-slave hierarchy (2)

Page 14: Network Time Synchronization with IEEE 1588 - Chess

14

EECS-149

Slide 27 April 29, 2009

Synchronization Basics – Delay Request-Response Mechanism

Master

time

Slave

time

t1

t4

t3

t2

Timestamps known

by slavet-ms

t-sm

Sync

Follow_Up

Delay_Req

Delay_Resp

t1, t

2, t

3, t

4

t1, t

2, t

3

t2

t1, t

2

Grandmaster- M S- BC - M S- OC

EECS-149

Slide 28 April 29, 2009

Under the assumption that the link is symmetric

Offset = (Slave time) – (Master time) = [(t2 – t1) – (t4 – t3)]/2 = [(t-ms) – (t-sm)]/2

(propagation time) = [(t2 – t1) + (t4 – t3)]/2 = [(t-ms) + (t-sm)]/2

Can rewrite the offset as

Offset = t2 – t1 – (propagation time) = (t-ms) – (propagation time)

If the link is not symmetric

• The propagation time computed as above is the mean of the master-to-

slave and slave-to- master propagation times

• The offset is in error by the difference between the actual master-to-

slave and mean propagation times

Synchronization Basics – Delay Request-Response Mechanism - 2

Page 15: Network Time Synchronization with IEEE 1588 - Chess

15

EECS-149

Slide 29 April 29, 2009

Critical implementation details- message viewMaster

timeSlavetime

t1

t4

t3

t2

Timestamps known

by slavet-ms

t-sm

Sync

Follow_Up

Delay_Req

Delay_Resp

t1, t

2, t

3, t

4

t1, t

2, t

3

t2

t1, t

2

Grandmaster- M S- BC - M S- OC

EECS-149

Slide 30 April 29, 2009

Critical implementation details- network view

Physical Layer(PLL clock recovery)

Network ProtocolStack

Application Layer(1588 Code)

OSC.

Clock

Detector

MII

MASTER

Physical Layer(PLL clock recovery)

Network ProtocolStack

Application Layer(1588 Code: PLL)

OSC.

Clock

Detector

MII

SLAVE

Network Elements

Physical Layer(PLL clock recovery)

Physical Layer(PLL clock recovery)

Queues

OSC.

Clock DetectorDetector

1588 Code

Jitter us<->many ms

Jitter ps<->low ns

Jitter low us

Jitter low ms

SLAVE MASTER

Page 16: Network Time Synchronization with IEEE 1588 - Chess

16

EECS-149

Slide 31 April 29, 2009

Critical node details:

MASTER SLAVE

T1

T2

T4

T3

Sync

Delay_Req

PHY

MAC

OS

Application Code

IEEE 1588

Code

IEEE 1588 Packet Detection

IEEE 1588 Clock

IEEE 1588

Control

Application IEEE 1588 Timing Support

(e.g. time stamping, time triggers…)

MII

LANThere are PRET design issues! The specifics differ depending on where the 1588 components are located, e.g. at task, ISR, MII, or in the PHY or some combination thereof!

EECS-149

Slide 32 April 29, 2009

Clock Rate Servo (Software portion)

Z-11-f

f∑+ S2M Delay

D_rsp (TS4)

D_req (TS3)

-

++

Z-11-f

f∑+ M2S Delay

S_rcv (TS2)

S_snd (TS1)

-

++

∑+

+1/2

One-Way Delay

∑+

-P

T ∑

Z-1

+

+

109

+-

- Clock Rate

Err

I

Clock rate signal drives hardware (or software)

rate adjust

This is a closed loop control system so loop time does matter- hence a

PRET design issue!

Page 17: Network Time Synchronization with IEEE 1588 - Chess

17

EECS-149

Slide 33 April 29, 2009

Coupling IEEE 1588 to your application: Critical issues

IE E E 1 5 8 8 C lo c k

L a tc htr ig g e r- in

t im e s ta m pg e n e ra t in g t im e s ta m p s

IE E E 1 5 8 8 C lo c k

C o m p a ra to r tr ig g e r-o u t

e v e n t t im e g e n e ra t in g e v e n ts

L a tc h

IE E E 1 5 8 8 C lo c k S yn th e s iz e r w a v e fo rm

g e n e ra t in g w a v e fo rm s

Hard real-world time:

Application specific but high node value apps <1 us,

military/surveillance <5ns

‘uProcessor’ time

EECS-149

Slide 34 April 29, 2009

National Semiconductor DP83640 PHYTER(from DP83640 datasheet)

Hard

real-world

time

‘uProcessor’ time

Page 18: Network Time Synchronization with IEEE 1588 - Chess

18

EECS-149

Slide 35 April 29, 2009

National Semiconductor DP83640 PHYTERSimple, Accurate Time Synchronization in an Ethernet Physical Layer Device, David Rosselot, ISPCS 2007

Hard real-world time

‘uProcessor’ time

EECS-149

Slide 36 April 29, 2009

How well can you synchronize?

2.02 ns2.8 ps1.005 ns1 pulse per

second output

Yes

900 ps80.6 ps319 ps10 MHz clock

output

Yes

48.3 ns5.237 ns-2.148 ns10 MHz clock

output

No

Peak-to-peakStandard

Deviation

MeanMeasured

Quantity

SyncE

Enabled

From: “DP83640 Synchronous Ethernet Mode: Achieving Sub-nanosecond Accuracy

in PTP Applications, National Semiconductor Application Note 1730, David Miller,

September 2007

Page 19: Network Time Synchronization with IEEE 1588 - Chess

19

EECS-149

Slide 37 April 29, 2009

Websites

General IEEE 1588 site: contains product pointers,

conference records, general guidance, standards related

http://ieee1588.nist.gov/

ISPCS (International IEEE Symposium on Precision Clock

Synchronization) site: Conference on IEEE 1588 and related subjects

http://www.ispcs.org/

EECS-149

Slide 38 April 29, 2009

BACKUP SLIDES

Page 20: Network Time Synchronization with IEEE 1588 - Chess

20

EECS-149

Slide 39 April 29, 2009

Synchronization Basics –Peer Delay Mechanism

Master

timeSlave

time

t1

t4

t3

t2

Timestamps known

by slavet-ms

t-sm

Sync

Follow_Up

Pdelay_Req

Pdelay_Resp

t3, t

4, t5, t

6

t3

t2

t1, t

2

Grandmaster- M S- BC - M S- OC

t5

t6Pdelay_Resp_Follow_Up

t6

EECS-149

Slide 40 April 29, 2009

The residence time is accumulated in a field of the Sync

(one-step clock) or Follow_Up (two-step clock) messages

End-to-End Transparent Clocks

Residence time bridgeIngress Egress

- +Ingress timestamp Egress timestamp

++

Message at ingress Message at egress

Preamble

PTP message

payloadNetwork

protocol

headersCorrection field

Preamble

PTP message

payloadNetwork

protocol

headersCorrection field

Page 21: Network Time Synchronization with IEEE 1588 - Chess

21

EECS-149

Slide 41 April 29, 2009

Infrastructure:

• Boundary and transparent clocks (IEEE 1588 bridges): Hirschmann,

Westermo, Cisco, others

• GPS master clocks: Symmetricom, Meinberg, Westermo,…

Silicon:

• Microprocessors with embedded 1588: Intel, Hyperstone, Freescale,

AMCC,…

• PHY/MAC level: National Semiconductor, others in proto or 1st silicon

(some also implement synchronous Ethernet)

Protocol & misc:

• 1588 stacks, IP blocks, consulting: IXXAT, U. Zurich, MoreThanIP, others

• Wireshark

Products (partial listing)

EECS-149

Slide 42 April 29, 2009

Consumer electronics: IEEE 802.1as

http://www.ieee802.org/1/pages/802.1as.html

The “AVB” effort should be carefully investigated by both PTIDES and PRET.

Audio/video systems applications