Clock Synchronization: Overview and Outlook



Similar documents
Precision Time Protocol (PTP/IEEE-1588)

Best Practices for Leap Second Event Occurring on 30 June 2015

Computer Time Synchronization

IEEE-1588 Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems

T200, PTP/IEEE 1588 Grandmaster Clock and

Computer Time Synchronization

Precision Clock Synchronization

19 Comparison of Ethernet Systems

From Fieldbus to toreal Time Ethernet

3.7. Clock Synch hronisation

Distributed Systems Theory 6. Clock synchronization - logical vs. physical clocks. November 9, 2009

Welcome. People Power Partnership PROFIdag 2013 Peter Van Passen Sales & Business Development Manager HARTING Electric 1/44

Synchronization in. Distributed Systems. Cooperation and Coordination in. Distributed Systems. Kinds of Synchronization.

The Role of Precise Timing in High-Speed, Low-Latency Trading

Analysis of Industrial PROFINET in the Task of Controlling a Dynamic System**

Indoor / Outdoor Antenna

Clocks/timers, Time, and GPS

IEC 61850: Communication Networks and Systems in Substations

Evaluating the Accuracy of Maxim Real-Time Clocks (RTCs)

Computer Network. Interconnected collection of autonomous computers that are able to exchange information

Clocking. Clocking in the Digital Network

STANDPOINT FOR QUALITY-OF-SERVICE MEASUREMENT

Precision Time Protocol on Linux ~ Introduction to linuxptp

Packet Synchronization in Cellular Backhaul Networks By Patrick Diamond, PhD, Semtech Corporation

FOUNDATION Fieldbus High Speed Ethernet Control System

Clock Synchronization

Quality of Service in Industrial Ethernet Networks

Time Calibrator Fountain Computer Products

How To Monitor And Test An Ethernet Network On A Computer Or Network Card

Securing GNSS with PTP & SyncE Adam Wertheimer Microsemi Adam.Wertheimer@microsemi.com. Power Matters

HANDBOOK. Measuring System DESIGN EDITORS PETER H. SYDENHAM RICHARD THORN ARTICLE OFFPRINT

Demystifying Wireless for Real-World Measurement Applications

Evaluating 1588v2 Performance Rev 2

Swiss Time Systems. The new multipurpose time server for the LAN and NTP-based Distributed Time System. by MOBATIME DTS 4138.

Allen Goldstein NIST Synchrometrology Lab Gaithersburg, MD

Multicast (Group) Addresses for Layer 2 (Ethernet) Transport of IEEE 1588 PTP Messages, with Application to AVB

Local Area Networks transmission system private speedy and secure kilometres shared transmission medium hardware & software

Objectives. The Role of Redundancy in a Switched Network. Layer 2 Loops. Broadcast Storms. More problems with Layer 2 loops

Latency on a Switched Ethernet Network

Time Synchronization of Computer in secure manner while using Teleclock & NTP Services

Using Network Time Protocol (NTP): Introduction and Recommended Practices

High Speed Industrial Ethernet for Semiconductor Equipment

VoIP Timing and Synchronization Best Practices

What? of-day clocks (a Residential Ethernet SG presentation) Synchronized time-of. David V James, JGG Alexei Beliaev, Gibson

Synchronization and precise timing in packet networks

Delivering NIST Time to Financial Markets Via Common-View GPS Measurements

White paper. Latency in live network video surveillance

2 Basic Concepts. Contents

Internet of things (IOT) applications covering industrial domain. Dev Bhattacharya

Lecture 8 Performance Measurements and Metrics. Performance Metrics. Outline. Performance Metrics. Performance Metrics Performance Measurements

How To Understand Gate

Process Control and Automation using Modbus Protocol

How To Make A Multi-User Communication Efficient

Remote Calibration of a GPS Timing Receiver to UTC(NIST) via the Internet*

Computer Networks CS321

Time Synchronization for Digital Subscriber Lines

Robot Perception Continued

CS263: Wireless Communications and Sensor Networks

Technical Bulletin. Enabling Arista Advanced Monitoring. Overview

QoS issues in Voice over IP

Table of Contents. Cisco Network Time Protocol: Best Practices White Paper

Best Practices for Testing Ethernet and Network Synchronization at the Cell Site

PROFINET the Industrial Ethernet standard. Siemens AG Alle Rechte vorbehalten.

LAN Switching Computer Networking. Switched Network Advantages. Hubs (more) Hubs. Bridges/Switches, , PPP. Interconnecting LANs

PHASOR MEASUREMENT UNIT (PMU) AKANKSHA PACHPINDE

Synchronizace a stabilita. Měření SyncE a 1588v2 PTP s přístroji VeEX nové vlastnosti

Wide Area Monitoring, Control, and Protection

Telecommunications Synchronization Overview

Course 12 Synchronous transmission multiplexing systems used in digital telephone networks

SPI I2C LIN Ethernet. u Today: Wired embedded networks. u Next lecture: CAN bus u Then: wireless embedded network

EPL 657 Wireless Networks

Tutorial on Parallel Redundancy Protocol (PRP)

BROADCAST SMPTE ST Introduction

EXAMPLES AND PROBLEMS. Competence Based Education Internet Protocols

Contents. Connection Guide. What is Dante? Connections Network Set Up System Examples Copyright 2015 ROLAND CORPORATION

LoRa FAQs. 1 of 4 Semtech. Semtech Corporation LoRa FAQ

HARTING Ha-VIS Management Software

Distributed Synchronization

Phase coherency of CDMA caller location processing based on TCXO frequency reference with intermittent GPS correction

DS1621 Digital Thermometer and Thermostat

Generic term for using the Ethernet standard in automation / industrial applications

Computer Time Synchronization Concepts

GPS NTP Time Server for Intranet Networks DIN RAIL Version

Remote I/O Network Determinism


EECS 122: Introduction to Computer Networks Multiaccess Protocols. ISO OSI Reference Model for Layers

EtherCAT Cutting Costs with High-speed Ethernet

Performance Analysis of Time-Triggered Ether-Networks Using Off-The-Shelf-Components

Communication Systems Internetworking (Bridges & Co)

Industrial Networks & Databases

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

Implementing VoIP support in a VSAT network based on SoftSwitch integration

Ajay Gummalla-July 2001

CSE331: Introduction to Networks and Security. Lecture 6 Fall 2006

Virtual PortChannels: Building Networks without Spanning Tree Protocol

Transcription:

Clock Synchronization: Overview and Outlook Sistemi e strumenti per l'automazione, A. Flammini, AA2011-2012

Synchronization as Network Service Reference clocks know correct time Daemons consult reference clock and distribute time to clients Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 1

How to Achieve Accuracy Time is sent from sender to receiver Network delay deteriorates result Must be added to transmitted value Receivers can tune each other (internal synchronization) Network delay must be measured Round-trip delay Timestamps are inserted in messages Node knows the communication delay Jitter deteriorates measurement Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 2

Various Approaches: internal and external synchronization Clock synchronization accuracy in distributed systems LANs Internal clock synchronization External clock synchronization Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 3

What for? Application Fields Distributed measurement systems Synchronized data sampling Distributed control systems Correlation of sensor signals Synchronization of actuators Reliable data transmission Secure data transmission Avoidance of replay attacks Network access Basis for TDMA schemes e.g. WirelessHART computes the difference between expected time and arrival time of the frame (offset) Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 4

Synchronization to measure time-of-flight Measuring time-of-flight or round-trip-time allows localization (if travelling speed is known e.g. 30cm/ns) Location range ±10 m 10 ns accuracy Ethernet-based networks 20cm/ns and the knowledge of length allows computing the delay between two nodes or infrastructure points Wireless-based networks Normally round trip time is used for ranging purposes -Delay of retransmission should be known and fixed -The time instant of transmission and of reception should be known Synchronization depends on timestamping Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 5

Distributed Measurements Detection of power line failures Delay analysis of transient signals Location range ±10 m? 10 ns accuracy required! Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 6

Automation Network and Control Systems Classical usage Local control loops Configuration over the fieldbus Set point values More recent usage Distributed control systems Control loop in corporate fieldbus Example: x-by-wire systems Synchronization allows to be independent on network delay do that at time Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 7

Application Bottlenecks Standard protocol stacks do not care about Real Time Time required for data provision and processing is independent of communication (and could be variable) OS and application could have their clocks, different from communication servo clock Synchronized clocks can help but communication, OS and application should share the same clock Same Clock Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 8

RTE: performance indicators IEC 61784-2 Industrial communication networks Profiles Part 2: Additional fieldbus profiles for real-time networks based on ISO/IEC 8802-3 suggests some performance indicators Delivery time Time needed to deliver the ADPU -Application Protocol Data Unit- (measured at the interface between the application process and the Fieldbus application entity). Maximum Delivery time (two cases) No transmission errors, one lost frame with recovery Throughput RTE Total amount of ADPU data (by octet length) on one link per second Non RTE bandwidth (related to Throughput RTE) % of bandwidth that can be used for non-rte communication on one link Time synchronization accuracy Maximum deviation between any two node clocks Non-time-based synchronization accuracy Maximum jitter of the cyclic behavior of any two nodes (triggering event for cycle) Redundancy recovery time Maximum time from failure to become fully operational again (single permanent failure) Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 9

Overall performance indicators Communication stacks have their own performance indicators OS have different indicators and a different way to experimentally evaluate them Applications are normally evaluated by means of I/O overall evaluation of performance is difficult Let s start with the sense of time! Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 10

Universal Time, UT Defined by the earth's rotation Astronomical observations Motion of GPS satellites Slightly irregular There are several different definitions of UT, but the difference between them is always less than about 0.03 s Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 11

Universal Time UT0, "raw" uncorrected UT Derived from meridian circle observations UT1 UT0 corrected for polar wandering (precession) UT2 UT1 corrected for seasonal variations t is the fraction of the year Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 12

International Atomic Time Temps Atomique International, TAI Weighted average of ~200 atomic clocks 50 national laboratories TAI -UT1 = 0 on 1958 Jan 1 TAI and UT1 are since drifting apart Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 13

Universal Time Coordinated UTC, Coordinated Universal Time TAI + integral number of seconds Leap seconds to keep UTC -UT < 0.9 s (Next leap second to be added has been programmed 2012 Jun 30 th ) UTC follows Gregorian Calendar (days, hours, minutes, ) and support Julian Date (since Jan 1, 4713 BC Greenwich noon=jd0, 29May2012 = Julian day number is 2456076) UTC days contain exactly 86,400 SI seconds (60 s per minute)...but the mean solar day is slightly longer than 86,400 SI seconds, therefore, occasionally the last minute of a UTC day is adjusted to have 61 seconds. This extra second is called a leap second. Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 14

Universal Time Coordinated Introduced in 1972 - In 1955 the cesium atomic clock replaced astronomic observation 1 January 1972 00:00:00 UTC = 1 January 1972 00:00:10 TAI (same tick rate) - UTC Format: 1970-01-01T00:00:00Z ( zulu format) - This is the starting point for Unix time (Posix time), that counts the number -32bit- of seconds elapsed (not counting leap seconds) - Overflow at 03:14:07 UTC 2038-01-19 (2 31 seconds) - 32 bit for fractional part (0,4 ns as the resolution) Used in Internet and WWW (NTP or SNTP protocol) Defined by Int. Telecom. Union Recommendation (ITU-R TF.460-6) Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 15

GPS (Global Positioning System) Time Kept by US Naval Observatory Reference two cesium and two rubidium atomic clocks is kept as closely as possible to UTC Offset to UTC is given in GPS Navigation Message Each GPS satellite continuously broadcasts a navigation message (50bits/s) composed of 5 subframes (37500bits) and sent at a precise time Galileo Time Will be kept by European agencies Control Stations Fucino, Oberpfaffenhofen Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 16

GPS Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 17

GPS Time of the last 180 days UTC vs. GPS Time Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 18

NTP Timescale Network Time Protocol, NTP NTP timescale based on the UTC timescale, First Tick: 0n 1 January 1972 (UTC) Insertion of leap seconds: conversion between NTP and UTC has to be modified After leap second insertion (stop counting), timescales resume ticking as if the leap had never happened. Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 19

A Brief History of Clocks Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 20

Servo clock Each node (transceiver) has its own quartz oscillator Fosc with a related counter Cosc (time Tosc=Cosc/Fosc) A servo clock Thw can be locked to Tosc (time Thw=Thw,offs+khw Tosc where normally khw=1) Thw,offs can be adjusted according to the time offset error TOE TOE = <expected time> - Thw Thw,offs = Thw,offs + TOE khw can be adjusted according to the time drift (rate) error TDE TDE = (<expected time> i - <expected time> i-1 )/(Thw i Thw i-1 ) khw = khw TDE Other servo clocks can be managed at OS or application level -> how to lock a servo clock to another servo clock Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 21

Oscillator Model Frequency Rate error Clock1 (Ref) Offset error Clock2 Clock1 (Ref) From clock1: Now it s time Clock2 (offset correction) Clocks depend on oscillators (temperature, voltage batteries-, quality, ) A good synchronization implies periodic compensation of offset θ and rate π If at time t0 Clock1 and Clock2 are synchronized with error ε(t0) then at time t ε(t) = π(t-t0) + ε(t0) and ε(t) can be limited with a correct selection of synchronization interval Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 22

Oscillator Model Frequency Frequency f(t) as a function of time t Frequency Offset Aging Factor Environmental Term Jitter noise Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 23

Short-Term Noise Short-term noise is typically normal-distributed, hence Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 24

Quality of Clocks Problem: Determine the local quality w/o reference clock Accuracy Precision ALLAN deviation for phase errors x is the time error sampled with τ time interval ALLAN deviation takes in account noise that cannot be compensated with offset and rate correction Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 25

Short-Term Noise Allan Variance as a function of τ is the synchronization interval (constant, typical value τ = few seconds) QZ = Quartz Crystal Oscillator RB = Rubidium Gas-Cell CS = Cesium-beam HM = Active Hydrogen-Maser Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 26

Finding the best master In order to have good external synchronization, the best clock source should be found Who has the best Allan deviation A-priori knowledge ( GPS is better than human-tuning ) Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 27

Synchronization protocol stacks Wired fieldbus (broadcast message) Ethernet (NTP, over UDP/IP port 123, 1ms accuracy) Real-time Ethernet (PTP or IEEE1588, over Ethernet or UDP/IP v2 only-, better than 100ns) Powerline (target: 1ms for metering, <1µs for power quality) Wireless (target: 1ms, 1ns if localization is required) GPS-synchronization A GPS-receiver provides a 1pps signal or synchronization over protocols (e.g. IEEE1588) Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 28

NTP -Network Time Protocol Strata structure (up to 256 strata, normally limited to 8-16) Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 29

NTP -Network Time Protocol Structure Minimum-weight spanning tree of time severs Remote clock reading of all peer time servers Well engineered statistical algorithms for data filtering and clock selection Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 30

NTP Pros and Cons Pros Available, standardized and field proven Cons Complex error modes to handle large and unreliable networks (Internet) Behavior in small systems not investigated Supports only ms-range accuracy Deterministic analysis not available Not suitable for provably correct, dependable systems Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 31

IEEE1588-2002 (PTP Precision Time Protocol) Tm1 Follow_Up with the Sync transmission precision_timestamp Slave_to_Master Delay Ts2 - Off Master Clock Tm2 Delay_Req Sync message Slave Clock Tm1+Off Ts1 Ts2 IEEE 1588 assumes network propagation delay to be symmetric Master_to_slave Delay Messages: Sync: multicast Follow_up: multicast Delay_Req: unicast Delay_Res: unicast Delay_Res with the Delay_Req receiving precision_timestamp Time (master clock) Time (slave clock) Ts1= Tm1 + Off + master_to_slave_delay Tm2= Ts2 Off + slave_to_master_delay One_way_delay = (master_to_slave_delay+slave_to_master_delay)/2= ((Ts1-Tm1)+(Tm2-Ts2))/2 Off = Ts1-Tm1-One_way_delay NOTA: Best Master Clock algorithm to select the master Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 32

IEEE1588-2008 (PTP Precision Time Protocol) Mapping mapping to UDP/IP (not only Ethernet) Type length value (TLV) field additional fields for arbitrary information (e.g. security) Alternate master a backup master that runs if the selected master fails Security authentication, key-distribution Transparent clock the problem to limit uncertainty in clock propagation Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 33

PTP: Boundary and transparent clock If several networks share the medium, the master clock synchronizes its own network, while the other networks can be synchronized by means of some shared nodes (clock uncertainty propagation) Boundary clock (IEEE1588-V1) A shared node acts as a slave clock of a network and as a master clock of the other one This node blocks PTP messages Transparent clock (IEEE1588-V2) A shared node corrects timestamping information according to the delays it introduces (internal switch delays and cable delays) It does not propagate clock uncertainty! (its clock error affects the retransmission delay only short time-) Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 34

IEEE 1588 with HW Timestamping Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 35

The PLC (powerline) communication media Compared with COTS Ethernet, fieldbusses Noisy, poor data transmission rate Communication may be interrupted Transmission power is limited due to EMC regulations Extensive signal processing due to channel characteristics Result: additional, but deterministic signal delay Channel adaptation not possible Counter measures against reflections, multi-path transmission not possible Every node may also be a repeater, since some nodes are not reachable by AP, Bridges directly Non-deterministic packet delay Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 36

PLC: Network Topology Non-stable topology Suppliers switch subnets for load balancing Nodes may be reachable (synchronized) by multiple Aps (with multiple accuracies) Nodes, subnets may be switched from one domain to another IEEE1588-v2 compliant solutions The problem of the choice of synchronization interval Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 37

IEEE1588 for PLC Side Drawbacks of IEEE1588 in PLC, Limited transmission bandwidth Poor reliability Non-stable topology Asymmetric Delay TDMA oriented network But with PLC-receiver side generated follow-up packets Fixed-Value Delay-Response Packets PTP is possible! Advantage: Full IEEE1588 stack is usable Slave may act as fallback-master Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 38

IEEE1588 for PLC Side Fondamenti di elettronica digitale, A. Flammini, AA2011-2012 39

Synchronization in wireless fieldbus Clock synchronization among wireless sensor nodes allows data sorting, but s? ms? µs? ns? A very good synchronization Allows power saving (transmitter and receiver are turned on only when needed) Wastes power (more data and messages must be transmitted) bad synchronization good synchronization Tx data data Tx sync data sync Rx Rx Wasted power Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 40

Synchronization protocols for WSN PTP is a complex stack (not very used) Requires IPv6 (6LowPAN) and UDP stack There are many synchronization protocols for WSN, trading accuracy with complexity (power consumption) e.g. TPSN is a light version of PTP (round trip time) e.g. LTS corrects only offset (no drift, identical nodes) Flooding Time Synchronization Protocol (FTSP) Lightweight Tree-based Synchronization (LTS) Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 41

Reference Broadcast Synchronization (RBS) Receivers synchronize each other (optimal for internal synchronization) i R j Packet reception interrupt Timestamp with Receiver uncertainty Packet reception interrupt Timestamp with Send Send Sistemi e strumenti per l'automazione A. Flammini, AA2011-2012 42