• Ei tuloksia

Evaluation Of Time Synchronization Accuracy In Network Devices

N/A
N/A
Info
Lataa
Protected

Academic year: 2022

Jaa "Evaluation Of Time Synchronization Accuracy In Network Devices"

Copied!
70
0
0

Kokoteksti

(1)

EVALUATION OF TIME SYNCHRONIZATION ACCURACY IN NETWORK DEVICES

Faculty of Information Technology and Communication Sciences Master of Science Thesis October 2020

(2)

ABSTRACT

Tommi Lehtonen: Evaluation Of Time Synchronization Accuracy In Network Devices Master of Science Thesis

Tampere University

Master of Science in Information Technology October 2020

Time synchronization is a well-known technology in telecommunication networks while it is still growing in Ethernet environments. The objective of time synchronization is to keep different devices in the same network in the same time. The need for more accurate and precise time synchronization is increasing because the timing constraints are getting stricter in e.g. automotive industry and factories that use Ethernet protocols. There are a few protocols that give opportu- nities to reach these constraints, but the main focus in this thesis is on the IEEE 1588 Presicion Time Procol (PTP). Other standards such as IEEE 802.1AS and Time Sensitive Network (TSN) are also discussed, albeit in much less detail.

The goal of this thesis is to find and evaluate the factors that cause errors in time synchro- nization accuracy. Another objective is to find effective methods for monitoring the quality of time synchronization. The test setup is composed of adequate time synchronization test equipment and an Ethernet switch supporting TSN. Five various test case scenarios were chosen according to different references and they were used for evaluating time synchronization performance.

The main factors that have an impact on time synchronization accuracy are external and in- ternal disturbance. Enviromental variability such as changes in temperature and humidity can be categorized as external disturbance. Jitter, wander and accuracy of timestamps are categorized as internal disruption. Other factors include asymmetry in the data path, and the distance between the timestamping point and the physical link.

Testing was performed by first obtaining reference data from a simple test without disruptions.

The results of other test cases were then compared to the reference data. The successful tests deployed in this thesis are test cases with enviromental changes, high traffic and variations in the data path. Test results indicate that variations in the data path have the most significant effect on the accuracy. Other disruptions also have some impact on the accuracy, but it is fractional in comparison.

Keywords: Time Synchronization, PTP, IEEE 1588, Ethernet, TSN, IEEE 802.1AS

The originality of this thesis has been checked using the Turnitin OriginalityCheck service.

(3)

TIIVISTELMÄ

Tommi Lehtonen: Aikatahdistuksen tarkkuuden arviointi verkkolaitteissa Diplomityö

Tampereen yliopisto

Tietotekniikan DI-tutkinto-ohjelma Lokakuu 2020

Aikatahdistus on jo pitkään tunnettu teknologia telekommunikaation parissa, mutta Ethernet ympäristöissä se on vasta kasvava teknologia. Aikatahdistuksen tarkoitus on saada tietyssä ver- kossa olevat laitteet jakamaan keskenään saman ajan mahdollisimman tarkasti. Aina tarkemman ja täsmällisemmän aikatahdistuksen tarve kasvaa teknologian kehityksen takia. Aikarajoitteet tiu- kentuvat jatkuvasti esimerkiksi autoteollisuuden ja tehdasteollisuuden parissa, missä käytetään Ethernet protokollaa. Aikatahdistusta varten on kehitetty monia protokollia, mutta tässä työssä keskitytään pääosin IEEE 1588 Precision Time Protocol (PTP) nimiseen standardiin. Työssä käy- dään myös läpi muita standardeja, kuten IEEE 802.1AS ja Time Sensitive Network (TSN).

Tämän työn tavoite on tutkia ja arvioida tekijöitä, jotka aiheuttavat aikatahdistukseen virheitä.

Toinen päämäärä on tutkia tehokkaita metodeita ja tapoja aikatahdistuksen laadun ja tarkkuu- den määrittämiseen. Työssä käytetty testijärjestelmä on koottu asianmukaisista testilaitteista ja TSN teknologiaa tukevasta Ethernet-kytkimestä. Työhön valittiin eri lähteistä yleisesti käytettyjä testitapauksia, joiden avulla pyrittiin arvioimaan aikatahdistuksen suorituskykyä.

Aikatahdistukseen vaikuttavat tekijät ovat joko ulkoisia tai sisäisiä. Ympäristön muutokset, ku- ten lämpötilan tai kosteuden muutos, voidaan tulkita ulkoiseksi häiriötekijäksi. Sisäiseksi häiriöte- kijäksi voidaan luokitella esimerkiksi viiveen vaihtelu, värinä ja aikaleiman tarkkuus. Muita tekijöitä ovat esimerkiksi linkkien epäsymmetrisyys ja aikaleimauksen fyysinen sijainti.

Testaus suoritettiin ensin tekemällä perustesti ilman keinotekoisia häiriötekijöitä. Tätä käytet- tiin vertailukohteena muille testeille. Tämän työn onnistuneet ja tulokselliset testit tehtiin kokei- lemalla ympäristön muutoksien, raskaan liikenteen ja linkkien pituuden vaikutuksia tahdistuksen tarkkuuteen. Testien perusteella pitkällä linkillä saatiin suurimpia tulosten vaihteluita aikatahdis- tuksen tarkkuuteen. Muilla testeillä oli myös vaikutusta tahdistuksen tarkkuuteen, mutta erot olivat kuitenkin hyvin minimaalisia.

Avainsanat: Aikatahdistus, PTP, IEEE 1588, Ethernet, TSN, IEEE 802.1AS

Tämän julkaisun alkuperäisyys on tarkastettu Turnitin OriginalityCheck -ohjelmalla.

(4)

PREFACE

The purpose of this Master’s thesis is to define and examine time synchronization in Eth- ernet environments. It was possible thanks to the research and testing facilities provided by TTTech Flexibilis Oy Tampere Finland where I work as a part of the Deterministic Eth- ernet IP team. The topic of the thesis was partially challenging but also very interesting, having no previous experience of the topic. Surprisingly I realised this thesis taught me alot and the gained knowledge is rather important in this field of industry. Only a few small parts created some obstacles on the way but otherwise the research was fascinating and pleasant.

Remarkable thanks belong to this Master’s thesis’ mentor Timo Koskiahde from TTTech Flexibilis Oy for phenomenal guidance and constructive feedback. Great thanks also to Tampere University’s professor Timo Hämäläinen, who was the supervisor of this the- sis and provided helpful advice during this work. Thank you also to my manager and the whole team who believed in me and supported me throughout this process. Finally, I would like to send thanks to my family and friends for patience and mental support.

Overall, the result would not have been possible without everyone’s individual effort.

Tampere, 15th October 2020 Tommi Lehtonen

(5)

CONTENTS

1 Introduction . . . 1

2 Time Synchronization . . . 2

2.1 Overview . . . 2

2.2 Essential Theory . . . 3

2.2.1 Ethernet . . . 3

2.2.2 Clock Stability Characterization . . . 6

2.2.3 One Pulse Per Second . . . 9

2.2.4 Oscillators . . . 9

2.3 Protocols & Standards . . . 11

2.3.1 Network Time Protocol . . . 11

2.3.2 Precision Time Protocol IEEE 1588 . . . 13

2.3.3 Generalized Precision Time Protocol IEEE 802.1AS . . . 17

2.3.4 Time-Sensitive Networking . . . 18

3 Methodology . . . 20

3.1 Requirements . . . 20

3.2 Test Environment . . . 21

3.3 Testing Equipment . . . 22

3.3.1 Spirent C50 . . . 23

3.3.2 Calnex Paragon . . . 23

3.3.3 PicoScope . . . 23

3.4 Methods for Measuring Time Synchronization . . . 24

3.4.1 1PPS Output . . . 24

3.4.2 Ingress Monitoring Method . . . 25

3.4.3 Egress Monitoring Method . . . 26

3.4.4 Reverse Sync Method . . . 26

3.5 Test Setup . . . 28

4 Test Cases & Results . . . 30

4.1 Baseline Test . . . 31

4.2 Frequency Stability . . . 36

4.2.1 Hot airflow test . . . 36

4.2.2 Cold airflow test . . . 41

4.3 Latency Uncertainty . . . 46

4.4 Latency Delay in Packet Traffic . . . 51

5 Evaluation & Conclusion . . . 56

References . . . 59

(6)

LIST OF FIGURES

2.1 OSI model [3] . . . 3

2.2 Ethernet packet format [3] . . . 5

2.3 Maximum Time Interval Error definition . . . 7

2.4 NTP timestamp exchange process [22] . . . 12

2.5 Generation of a timestamp . . . 13

2.6 PTP End to End Synchronization Process [27] . . . 14

2.7 PTP Peer to Peer Synchronization Process [27] . . . 16

3.1 Example of an industrial network structure . . . 21

3.2 1PPS signal comparison . . . 24

3.3 Ingress measuring method [14] . . . 25

3.4 Egress measuring method [14] . . . 26

3.5 Reverse Sync measuring method [14] . . . 27

3.6 Initial test setup . . . 28

3.7 Test setup with Calnex Paragon . . . 29

4.1 Mean path delays during the baseline test . . . 32

4.2 Offset during the baseline test . . . 34

4.3 Mean path delays during the test with hot airflow . . . 37

4.4 Offset during the test with hot airflow . . . 39

4.5 Mean path delays during the test with cold airflow . . . 42

4.6 Offset during the test with cold airflow . . . 44

4.7 Mean path delays during the test with longer data path . . . 47

4.8 Offset during the test with longer data path . . . 49

4.9 Mean path delays during the high load traffic test . . . 52

4.10 Offset during the high load traffic test . . . 54

5.1 MTIE and Average Offset results . . . 57

5.2 Average Mean Path Delay results . . . 58

(7)

LIST OF TABLES

2.1 Base standards of Time-Sensitive Networking . . . 18

2.2 Summary time synchronization protocols and standards . . . 19

3.1 Testing equipment for time synchronization evaluation . . . 22

4.1 Baseline test time synchronization characteristics . . . 35

4.2 Hot airflow synchronization characteristics . . . 40

4.3 Cold airflow synchronization characteristics . . . 45

4.4 Long data path time synchronization characteristics . . . 50

4.5 High load traffic test time synchronization characteristics . . . 55

(8)

LIST OF SYMBOLS AND ABBREVIATIONS

1PPS one pulse per second

AVB Audio/Video Bridging

BC boundary clock

BMCA Best Master Clock algorithm CAT Ethernet cable category

CRC Cyclic Redundancy Check

CSMA/CD Carrier Sense Multiple Access with Collision Detection

DC direct current

DUT device under test

E2E End to End

FCS Frame Check Sequence

GPS Global Positioning System

gPTP generalized Precision Time Protocol IEEE 1588 Precision Timing Protocol standard IEEE 802.1AS Precision Timing Protocol profile IEEE 802.3 Ethernet standard

LAN Local Area Network

LLC Logical Link Control

MAC Media Access Control

MII Media-Independent Interface MTIE Maximum Time Interval Error NIC Network Interface Controller

NTP Network Time Protocol

OC ordinary clock

OCXO Oven Controlled Crystal oscillator OSI Open Systems Interconnection

P2P Peer to Peer

PHY physical layer

PTP Precision Timing Protocol

(9)

RbXO Rubidium-Crystal oscillator RJ-45 Registered Jack 45 connector

rms root mean square

SC Subscriber connector

SFP Small Form Pluggable

Sync Synchronization

TC transparent clock

TCXO Temperature Compensated Crystal oscillator

TDEV Time Deviation

TSN Time-Sensitive Networking USB Universal Serial Bus

WAN Wide Are Network

XO Quartz Crystal oscillator

(10)

1 INTRODUCTION

As the technology is developing in automotive and industrial platforms, the communica- tion demands between devices and components are getting more critical. Time synchro- nization is a technology that allows real time communication solutions inside networks, meaning that the time between different devices is nearly the same. Time difference should be under a microsecond or a sub-microsecond to be able to reach the high presi- cion performance and required by the latest time synchronization standards.

Nowadays the precision of the communication should be within a sub-microsecond range in the industrial Ethernet environments. Traditionally, time synchronization is implemented using Network Time Protocol (NTP). Although, this technology does not reach to nanosec- ond accuracy that is why it is not accurate enough when the platform requires precise real time communication. Typically this protocol is used in large scale networks such as Wide Area Network (WAN). Alternative to NTP, more precise protocol is Precision Time Protocol (PTP) that is used in applications and networks that requires high precision, nanosecond level, time synchronization between devices.

Time synchronization has been used long time in telecommunication systems but when it comes to the Ethernet environment the technology is quite new. That is why there is limited amount of specification for modelling and designing an Ethernet device for time synchronized network with high precision requirements.

With high precision time synchronization the factors that impacts synchronization accu- racy should be considered meticulously. With the PTP the timings are so precise that even small disturbance could have significantly malignant result to the synchronization accuracy. Factors such as clock frequency, quality and stability of an oscillator, propaga- tion delays at the physical layer (PHY) and other jitter that might occur inside of a digital device have a negative impact on the accuracy of the time synchronization.

The purpose of this thesis is to do a research that investigates the elements and the factors that impacts the most to the accuracy of time synchronization. Research provides also practical and useful measuring techniques which can be used for analysing time synchronization accuracy in Ethernet devices.

In this thesis, chapter 2 defines the elementary theory of time synchronization. Chapter 3 describes the methodology and test environment used in this thesis. Chapter 4 goes through test cases and results. Chapter 5 contains conclusions and evaluations of the test cases.

(11)

2 TIME SYNCHRONIZATION

Chapter 2 goes through the relevant theory for understanding time synchronization. The main focus of this chapter is to describe how does the Ethernet and time synchronization work. There is an introduction to the characteristics for measuring the accuracy of time synchronization. Chapter 2 also presents relevant protocols and standards used for time synchronization.

2.1 Overview

Every synchronous digital device has a clock signal which changes its state between high and low. This signal is used to make synchronous actions and operations in the circuit.

Digital devices usually have their own clock generator to create certain clock frequency.

Even though timings of various devices are adjusted correctly with each other, their clocks will differ from each others at some point due to clock drifting. [1]

One of the main purpose of time synchronization is to ensure that different digital equip- ment have the same time. However this is feasible only in theory, so the same time should be adjusted as precise as possible. In this case the precision means that the time difference should be under a microsecond. After the time difference has been corrected the equipment are synchronized with each other. Now the communication and events between devices are happening in real time because they are sharing almost the same time. [1]

The device which specifies the defined clock frequency or which is chose by protocol dependent algorithms is usually called a grand master clock. Other clock frequencies that are synchronized referring to the grand master clock are usually called slave clocks. First, slave clocks must be synchronized with the master clock with actual time which is the time that is used as an reference. Additionally after the time synchronization, it is possible to provide also frequency synchronization and for example phase synchronization. Purpose of these technologies is that the devices would operate in the same frequency and have the same phase for more precise and stable synchronization. [1, 2]

(12)

2.2 Essential Theory

Time synchronization is used a lot among telecommunication networks, but the focus in this thesis is mainly in time synchronization in industrial Ethernet network environment.

Telecommunication has effective technologies for synchronization which cannot be used in Ethernet environments. For example, there is an old synchronization technique used in telecommunication that recovers the frequency from the control link. With Ethernet networks this technology is not usually feasible since the Ethernet typically does not provide deterministic links through the network. [2]

2.2.1 Ethernet

In the 1980’s introduced IEEE 802.3 Ethernet standard is a communication standard which connects multiple network devices together. Ethernet gives opportunity to share information between different devices with high bit rates. This standard defines physical layer and data link layer of wired Ethernet. These two layers are the first two layers in the Open Systems Interconnection (OSI) model. OSI is a theoretical stack of seven layers which can be used as a reference to help understand how networks operate as shown in Figure 2.1. [3]

Figure 2.1. OSI model [3]

Physical layer contains two different components such as cabling and devices. Usually Ethernet Local Area Network (LAN) was implemented by using coaxial cables but nowa- days they are implemented typically by using twisted pair copper wiring and fibre optic wiring. Coaxial cables can appear with older network connections and environments.

(13)

Twisted pair cables are divided into categories (CAT) where the most common one is CAT 6 with speed up to 1 Gb/s. Other common ones are CAT 6a and CAT 7 with speeds up to 10 Gb/s. Cat 5 and CAT 5a cables speeds up to 100 Mb/s are also used in many network environments but they are more susceptible to noise. [3, 4]

Twisted pair Ethernet cables are connected to devices with eight pin Registered Jack 45 (RJ-45) connector which allows devices to transmit and receive data in half-duplex or full-duplex mode. Half-duplex transmits data one direction at a time and is rarely used anymore. Full-duplex allows data to be transmitted in both directions simultaneously using two pairs of wires inside the cable. In gigabit Ethernet 4 pairs are used. [3]

Optical fibre cables use class or plastic optical fibre as a conduit for light pulses to trans- mit data. This technology allows data to travel longer distances with higher speeds. Fibre optic cables are connected to network devices with Small Form Pluggable (SFP) or Sub- scriber connector (SC). There must be Ethernet to Ethernet fibre converters in order to use fibre optic cables in network environment. Then the network can benefit the speed and long ranges optic fibre provides. [3]

Ethernet devices are for example computers, printers or any other device that has either internal or external network interface controller (NIC). Ethernet switches and routers are used to connect all the devices or networks together and direct Ethernet traffic between them. This allows fluent communication between all devices in the network. Gateways and bridges are used to connect multiply networks together and enable communication between them. Gateways connect multiple different networks together while bridge con- nects multiple similar networks together so practically it is one big network. [3]

Data link layer of the OSI model can be divided in two components such as Logical Link Control (LLC) and Media Access Control (MAC). LLC establishes data paths from one device to another for Ethernet communication. MAC uses hardware addresses which are coded in device’s NIC. That address is used to identify specific Ethernet device to show the source and destination of data transmissions. [3, 4]

Ethernet traffic is based on Ethernet data packets. Data packets are transmitted by using an algorithm called Carrier Sense Multiple Access with Collision Detection (CSMA/CD).

This algorithm is used to reduce collision between Ethernet data packets. CSMA/CD also increases success rate of data transmissions. Algorithm tries to check possible collisions by sending one bit on the path. If there is no traffic or collision detected with the first byte then the algorithm will send the rest of the bits while still checking collision in the path. If the algorithm detects a collision, it will calculate a waiting time and start the whole process again until the whole transmission is complete. The collision checking is no longer needed because collisions does not appear when Full-duplex is used. [3, 4]

Ethernet packet format is described in Figure 2.2. Packets consist of eight different fields such as preamble, Start Frame Delimeter (SFD), destination and source address, length- /type, data, padding and Frame Check Sequence (FCS) field. Extension field is added at the end of the frame in only if it is required. [3, 5]

(14)

Figure 2.2. Ethernet packet format [3]

Preamble consists of 56 bits (7 bytes) alternating between 0 and 1. Preamble bits are used for synchronization the receiver side clocks. After preamble comes the preamble’s last byte called SFD, which informs that the actual data is sent. Then comes destination and source address fields which both are size of 48 bits (6 bytes). Destination address field indicates the destination MAC addresses where the frame is supposed to go. Source address field tells the MAC address of the device which sent the packet. Length/type field is size of 16 bits (2 bytes) and it indicates Ethernet frame’s contents. IEEE 802.3 defines type field as a length field. It tells the size of the actual data so that the receiving device is ready to allocate proper amount of resources to handle the data. Data field contains the data source device sends to the destination devices which is also known as Payload.

Length of the data field is normally between 46 and 1500 bytes. Padding field is filled with random bits if the data field does not meet the required size of 46 bytes. FCS field is size of 32 bits (4 bytes) and it contains Cyclic Redundancy Check (CRC) value that is generated by the source destination device. Receiver device checks the integrity of the data with the value inside the FCS field. [3, 4, 5]

When implementing a network where all the devices are for example connected to an Ethernet switch, the network is using star topology. This topology allows more path di- rections and it reduces collision possibilities when it is compared for example to obsolate

(15)

topoplogy such as bus topology where every device uses the same paths for data trans- mission. One common topology is called ring topology where network devices are con- nected so that together they constitute a ring formation. If network devices are connected to each other in sequence it is called chain topology. Star, ring and chain are the most common network topologies that are used in Ethernet implementation. [3, 4, 6]

The timestamping of the Ethernet packets is happening either on the data link layer or on the physical layer. Timestamping means storing electronically the actual time of a transaction. Timestamping has been used to sign dates and times for example in digital cameras marking the time when a picture is taken or when modifying a file in computer.

Timestamping is used widely also in time synchronization. In Ethernet networks it is feasible to sign actual time when sending an Ethernet packet and use this for example to measure Ethernet’s performance simply testing how much time it takes to send the packets over the Ethernet network. [6]

Timestamping plays a big role in time synchronization. It is essential feature to measure time between different devices. Practically time synchronization is achieved by sharing messages or packets that includes time information which contains the information about the time when the packet has sent or received. This time information is also called as a time stamp. The time information usually tells when the packet has left from a timing node or when it has received by a timing node. Timestamping is implemented either in software level or in hardware level depending on which protocols are used and what demands the systems has. [7]

2.2.2 Clock Stability Characterization

Maximum Time Interval Error

Maximum Time Interval Error (MTIE) is used for characterizing frequency and time in digital device networks. MTIE is a maximum error committed by clock when testing a time interval in a certain period of time. MTIE differs from other measuring techniques so that it measures the highest peak compared to the reference when other measuring methods gives average results concerning frequency stability. MTIE is defined in Figure 2.3 and it is possible to calculate it with the following formulas. [8, 9]

(16)

Figure 2.3.Maximum Time Interval Error definition

First, timing signal, which is the device’s clock signal, is calculated at timet. The timing signal wave, that indicates the continuous clock signal, can be formulated from

s(t) =AsinΦ(t), (2.1)

whereA is referring to the peak amplitude andΦis the total instanteneous phase which represents the ideal linear phase that increases when tincreases and frequency has a different offset from its nominal value. Time function is now formulated by using also the total instanteneous phase at timet[9, 10]

T(t) = Φ(t) 2πvnom

, (2.2)

wherevnom is the nominal frequency of the oscillator. Now the time error, which tells the difference between two reported clocks, can be calculated when the measured clock and the reference clock are known. Time error (x(t)orT E(t)) at timetis formulated from

x(t)≡T E(t) =T(t)−Tref(t), (2.3)

(17)

whereT(t)is time at measured clock andTref(t)time at reference clock. After the time errorT E(t)is calculated the maximum error can be finally formulated by using function

M T IE(τ, T) = max

0≤t0≤T−τ

{︃

t0≤t≤tmax0[T E(t)]− min

t0≤t≤t0[T E(t)]

}︃

(2.4)

⇒M T IE(τ, T) = max

t0≤t≤t0[T E(t)]− min

t0≤t≤t0[T E(t)] (2.5) whereτ is the observation interval. The formula can be simplified when assuming that

M T IE(τ) = lim

T→∞M T IE(τ, T). (2.6)

Theoretically the device should be designed and verified the way that in everyτ,M T IE(τ) stays below the required limit for the whole age of the device. [9, 10]

Time Deviation

Time deviation (TDEV) is method that examines the stability between a measured phase to a reference phase. TDEV is one of the most common methods to describe quality of synchronized clock signals in synchronous networks. It allows to assess the variations of specific period of time, or time interval, that the synchronization signal provides. It is used to recognize the type of noise that is affecting to the synchronization signal. Computation of TDEV is based on the averaging of second differences of the phase processx(t)(2.3) of the analyzed timing signals(t)(2.1). [8, 11, 12]

T DEV(τ) =

1

6n(N −3n+ 1)

N−3n+1

∑︂

j=1

j+n−1

∑︂

i=j

(xi+2n−2xi+n+xi)

2

(2.7)

wherexi is sequence of N samples of time error functionx(t) (2.3) that is taken in the time intervalτ0. The observation intervalτ =nτ0. The TDEV formula can be contracted by simplifying the calculation of the sum and then the formula takes the form

T DEV(nτ0) =

⎷ 1

6∗ 1

N −3n+ 1∗ 1 n2

N−3n+1

∑︂

j=1

Sj2(n), (2.8)

whereSj(n)can be calculated from

Sj(n) =Sj−1(n)−xj−1+ 3xj+n−1−3xj+2n−1+xj+3n−1. (2.9)

(18)

S1(n) =

n

∑︂

i=1

(xi+2n−2xi+n+xi) (2.10) Time deviation of a clock signal can be now calculated and evaluated using provided variables and equations above. [8, 11, 12, 13]

2.2.3 One Pulse Per Second

One pulse per second (1PPS) signal is a common method to measure quality of time synchronization between nodes that shares time information. [14] 1PPS is a physical output line that comes out from a device and gives pulse signals in every second. It is used to measure time error between master and slave node. In laboratory environment it is feasible to connect, typically with a coaxial cable, the master and the slave in the same test device to calculate the clock difference between them. Difference measurement is done by comparing the 1PPS signal rising edge coming from the slave with the 1PPS signal rising edge coming from the master in every new second. The delta time between the nodes is the time error between them. [14, 15]

In long term measurements the 1PPS method gives realiable results but in short term it does not provide as accurate information. Because 1PPS measuring method requires separate physical output signal from the device, it is not feasible to implement in some systems that has limited size and resources such as automotive environment. [14] In this case the 1PPS method is considered too costly and impractical to implement. With large and already deployed networks it is also difficult to use because the 1PPS signals from the master and the slave should be able to be connected to the same measurement equipment for the further analysis although 1PPS is one of the most common aproach.

There are various other methods that provides more accurate results. One method is to connect clock outputs of the master and slave nodes directly to a testing device and analyze the difference of the clock signals but this is not possible with digital applications.

[15]

2.2.4 Oscillators

Oscillator is a physical component that is commonly used to generate a clock signal for digital devices. Oscillator is a key element for clock generation in digital devices. It is a component that generates output signal for electronic circuit. It generates a signal that has constant amplitude and frequency. Basically, oscillator transforms direct current (DC) power to a periodic signal which is also known as a clock signal that alternates between high and low state. [16, 17]

There are various types of oscillators that are used in digital devices. The type of oscil- lator depends on how accurate timing demands the system requires. Oscillators perform differently depending on the environment and operating time/age. The most common os-

(19)

cillator types used in time synchronization applications are Quartz Crystal (XO) oscillators and Atomic oscillators. [17, 18]

Quartz Crystal Oscillators

Crystal oscillators uses piezoelectric crystals which are vibrating between two metal plates forming electrical signal that has specific amplitude and frequency. The crystals are cut in different ways depending on the requirements of the oscillator. The most typical cuts used in time synchronization applications, are AT cut and SC cut. The most common cut is the AT cut which performs best in room temperature environments. SC cut stands for stress compensated cut and it has more precise cutting process and they endure sig- nificantly higher temperatures than AT cut, thus being more expensive. SC cut crystals maintains better their accuracy in temperature and environment variations. Crystal oscil- lators are usually accurate in short-term age but the accuracy will become weaker during aging, because of the mechanical resonator. [17, 19]

The most common and basic XO is Temperature Compensated Crystal Oscillator (TCXO).

It has a separate circuit that is sensing the temperature and applies correction to the de- vice output frequency so that the frequency variations will be minimal when temperature changes. Devices that uses TCXO are usually used in room temperature environments so the crystal cut is typically AT cut. TCXO has timing performance that is usually accu- rate enough for most time synchronization applications. Accuracy, with these oscillators, of an 1PPS output is around 20 to 50 nanoseconds and jitter is approximately 9 picosec- onds root mean square (rms). [17]

Other common XO, used in high precision time synchronization applications, is Oven Controlled Crystal Oscillator (OCXO). In OCXO the resonator is thermal insulated and heated in so called oven so the temperature would stay as constant as possible. OCXO is designed to operate in temperature of 75C and the crystal is processed using typically the SC crystal cut. These oscillators has approximately 0.3 picoseconds rms of jitter which is significantly lower than TCXO. The fact that it can provide excellent stability characteristics are one of the reasons why OCXO is used in really high precision time synchronization applications. [17]

Atomic Oscillators

Atomic oscillators uses energy difference between two atomic states to create electri- cal signal with specific amplitude and frequency. These oscillators have better short-term and long-term stability than crystal oscillators. Although they are precise and long-lasting, they cost significantly more and consumes bigger amount of space than crystal oscilla- tors. Also, energy consumption of an atomic oscillator is higher than XO. An atomic oscillator can also operate well by itself without any external reference frequency. [17, 19]

One of the most common atomic oscillator is Rubidium oscillator. It uses characteristics

(20)

of a Rubidium atoms to create highly accurate and stable frequency signal. Rubidium oscillator has approximately a jitter of 0.2 picoseconds rms which is lower than OCXO.

Oscillators have a certain phase noise which occurs in a random fluctuation in the fre- quency domain. Rubidium oscillator’s phase noise is not typically as good as OCXO.

However, these technologies can be merged together and form Rubidium-Crystal Os- cillator (RbXO) that has the best features of both technologies if the system requires extremely stable frequency and low power consumption. [17, 19]

2.3 Protocols & Standards

There are various standards and protocols used to synchronize devices inside a network and implementing a synchronous LAN. This section describes the most relevant protocols and standards concerning the thesis. The most common protocols that are used to syn- chronize networks are Network Time Protocol (NTP) and Precision Time Protocol (PTP).

NTP is an older protocol that is used mainly to synchronize larger networks such as Wide Area Networks (WAN) but it can be applied also to synchronize LAN. PTP is used in Eth- ernet networks which require more precise time synchronization. PTP is more accurate and precise than NTP but it is more expensive and more complicated to implement. [20]

2.3.1 Network Time Protocol

Network Time Protocol is used to synchronize time with a server over the internet. This protocol provides synchronization over network between various devices which are lo- cated globally in different places. Synchronization between devices is possible if devices are connected to a server that can provide accurate time. For time synchronization, NTP provides accuracy in millisecond range which is enough for many applications and sys- tems. [21, 22]

NTP can be implemented in various ways but the most common way to implement it is to create so called client-server model. Basically a client requests time information and a server timestamps that packet and sends back a time stamp packet [1]. Packets are timestamped when departuring and arriving to either end. With the time stamp informa- tion the propagation delays can be calculated and the client is able to synchronize its clock according to the server. [1, 22]

NTP is divided into different levels which are also known as stratums. Highest level is stratum 0 where the time is the most accurate. For example, Global Positioning System (GPS) or atomic clock belongs to the stratum 0. Stratum 1 contains time servers which are synchronized with GPS or an atomic clock. Other devices that are synchronized according to time servers are on stratum 2. In theory, every device on the stratum 2 could be synchronized also with the highly accurate GPS or atomic clock to reach the best time accuracy. However, that implementation is rather expensive, infeasible and impractical to put into effect. [22]

(21)

Commonly, an accurate time server is called as a master or a reference clock and a client host is called a slave. The synchronization process starts, as shown in Figure 2.4, when the client sends packet to the server containing the time when the packet was sent (t1).

The server then timestamps arriving packet (t2) from the client. After a while, the server sends back a packet which contains information about when the client has sent the initial packet (t1) and when the server has received it (t2) including the current time (t3) when response message towards the client has been sent. When the packet arrives to the client from the server it gets timestamped by the client host (t4). [22, 23]

Figure 2.4.NTP timestamp exchange process [22]

Now, with these timestamp information the client is able to calculate the network round trip time delay and time offset. After computing and evaluating the essential values, the client corrects its time according to the server. The round trip delay and time offset, that tells the average time differencies between master and slave nodes, can be calculated using following equations

θ= (t2−t1) + (t4−t3)

2 (2.11)

δ = (t4−t1)−(t3−t2), (2.12) whereδ is the network round trip delay andθis the time offset. The round trip delay tells the average time from the packet to travel between slave and master hosts. The time offset is the absolute time difference between the master and the slave. [22, 23]

(22)

2.3.2 Precision Time Protocol IEEE 1588

Precision Time Protocol is a clock synchronization solution for distributed systems and it is described in IEEE 1588 standard. The first version of PTP was approved in 2002 and was called IEEE 1588-2002. Second version was named IEEE 1588-2008 and it was approved in 2008. This was the version that was widely deployed and is used currently.

The protocol was designed originally for testing systems, but it is now used also with real-time control systems and telecommunications equipment. [24]

PTP and NTP protocols both uses time stamping for calculating time differences be- tween devices. PTP uses software-based and hardware-based time stamping methods.

This means that synchronization messages or timestamping are implemented in soft- ware or hardware level. This is one of the main reasons why PTP can provide accuracy in nanosecond range inside a local network. More precise, stamping is ideally done at physical layer (PHY) but usually it is done at Media-Independent Interface (MII) of the PHY. MII is used to connect a MAC block to a PHY chip and therefore the stamping is happening close to the link of a node as shown in Figure 2.5. [24, 25]

Figure 2.5.Generation of a timestamp

PTP network has usually multiple nodes that uses different clock-modes. PTP uses usu- ally three different kinds of clocks such as ordinary clock (OC), boundary clock (BC) and transparent clock (TC). Ordinary clock has one PTP port and it could be used as a master clock or slave clock. Boundary clock is otherwise similar as OC but it has multiple PTP ports. Ethernet switches, for example, are normally used as a Transparent Clock or a Boundary Clock. [26]

(23)

BC determines one port as a slave and others as masters. BC is synchronized by its slave port and it distributes the time from its master ports. Transparent clock has always multiple ports and it is passive. PTP frames goes through switches that uses TC unless it is a Peer-to-Peer message. TC calculates the time it takes for one packet to go through a network device, and adds that time to the PTP packet’s correction field. [26]

Ethernet network that incorporates PTP chooses the master clock with the best master clock algorithm (BMCA). BMCA defines the best clock to be used as a reference clock.

Master clock sends frequently Sync messages to all slaves, usually from every second to every few seconds. Master node and slave node exchanges messages between each other using End to End (E2E) mechanism according to Figure 2.6 and Peer to Peer (P2P) mechanism according to Figure 2.7. [26, 27]

Figure 2.6. PTP End to End Synchronization Process [27]

PTP synchronization process starts with master sending a synchronization (Sync) mes- sage to a slave. Sync message contains time information (t1) when the packet has left

(24)

from the master. The Sync message will be time stamped at the physical layer when it departures from the master and arrives to the slave. After the first Sync message is successfully sent, the master will send a Follow_Up message. The Follow_Up message contains time information about when the first Sync message (t1) was actually sent. After the Follow_Up message the slave corrects its local time (t2) according to the master. [26, 27, 28]

At this point, using E2E, the slave clock will be corrected according to the master clock excluding the propagation delay between master and slave. Next, slave sends a delay request (Delay_Req) message which is timestamped when the message departures from the slave (t3) and arrives to the master (t4). Then, master will send a delay response (Delay_Resp) message which contains information the when the Delay_Req message was arrived (t4) to the master. According to these timing information slave calculates the propagation delay and corrects its local clock to be synchronous with the master. [27]

The delay can be calculated from equation:

Delay = (t2−t1) + (t4−t3)

2 . (2.13)

(25)

Figure 2.7.PTP Peer to Peer Synchronization Process [27]

With P2P mechanism the slave sends a delay request message (Pdelay_Req) which is timestamped when the message has sent (t1). The master receives the Pdelay_Req message and timestamps it when it arrives (t2). Then the master sends a delay response message (Pdelay_Resp) and gets timestamped on the departure of the message (t3).

Pdelay_Resp message contains information about timestamps depending is the process using one-step or two-step operations. [26, 28, 29]

With two-step mode, the Pdelay_Resp contains only the information when the message has left from the master (t3). With one-step mode, the Pdelay_Resp contains delta be- tween arrived Pdelay_Req message (t2) and departured Pdelay_Resp message (t3). If the node is not able to use one-step mode it will use two-step mode instead and send a

(26)

follow up message (Pdelay_Resp_Follow_Up) after Pdelay_Resp. [26]

The Pdelay_Resp_Follow_Up message contains timestamp information when the Pde- lay_Resp has sent (t3). The slave receives the Pdelay_Resp message and timestamps it when the message arrives (t4). Now the node that requested the delay has all necessary information for calculating the delay between nodes using Equation 2.13. This peer delay link measurement is done from the slave to the master and also from the master to the slave. [26, 28, 29]

After calculating the delay, the slave is able to calculate the phase difference which is also called Offset. Slave can adjust the Offset after calculating it using the following equation as presented in Figure 2.6:

Of f set= (t2−t1)−Delay. (2.14) There are two different mechanisms to measure delay such as Peer to Peer (P2P) and End to End (E2E). P2P is used to measure delay between every two neighbour ports as shown in Figure 2.7. E2E mechanism is used to measure delay from slave to master as shown in Figure 2.6 and calculated in Equation 2.13. Both mechanisms assumes that the transmission delay is symmectrical between nodes. [27]

2.3.3 Generalized Precision Time Protocol IEEE 802.1AS

IEEE 802.1AS is a PTP profile that is based on Precision Time Protocol IEEE 1588 with reduced features and enhanced physical layer preferences. A PTP profile specifies generally the optional PTP features that are included or excluded and allows PTP to be used for specific purposes and applications. 802.1AS was developed originally used with OSI data link layer (Figure 2.1) Audio/Video Bridging (AVB) local area networks that requires precise timing and synchronization. The profile is also known as the generalized Precision Time Protocol (gPTP). [30]

IEEE 802.1AS has several performance and scalability advantages over PTP. However, the profile requires that every device in the network supports 802.1AS [31]. In 802.1AS network nodes are called as bridges and end-stations. A bridge performs similar as a PTP boundary clock and an end-station act as a PTP ordinary clock. Although, 802.1AS bridges are similar to PTP boundary clock they transport synchronization messages in mathematically equivalent way as PTP transparent clock. Synchronization in a 802.1AS network is done by using peer delay mechanism as in Figure 2.7. [30, 31]

When a node meets its requirements it is considered as a time-aware system. One of the main advantages of the 802.1AS over PTP is that every time-aware system invokes the BMCA. In 802.1AS network every end-station and bridge participates in the best master clock selection. Each node shares their clock quality between their neighbours and compares the neighbours clocks with their own clock. The top quality clock will be

(27)

used as a grand master clock. However, if the current grand master is removed the network will rapidly find a new clock used as a grand master. [30, 31]

2.3.4 Time-Sensitive Networking

Time-Sensitive Networking (TSN) is a group of standards that among other standards uses the gPTP IEEE 802.1AS for synchronization and fault-tolerance communication be- tween various network devices inside a local network. TSN base standards are listed in Table 2.1 and based on those, TSN Task Group has published several standards for TSN to improve real-time communication. [32, 33]

The Time-Sensitive Networking Task Group is formerly known as Audio/Video Bridging Task Group. TSN has three main elements that are relevant for achieving real-time com- munication in the network. Elements such as time synchronization, scheduling and traffic shaping and communication path selection will help to achieve goals of the TSN technol- ogy. [32]

Table 2.1. Base standards of Time-Sensitive Networking

Standard Name

IEEE Std 802.1Q - 2018 Bridges and Bridged Networks

IEEE Std 802.1AB - 2016 Station and Media Access Control Connectivity Discov- ery

IEEE Std 802.1AS - 2011 Timing and Synchronization IEEE Std 802.1AX - 2014 Link Aggregation

IEEE Std 802.1BA - 2011 Audio/Video Bridging Systems

IEEE Std 802.1CB - 2017 Frame Replication and Elimination for Reliability IEEE Std 802.1CM - 2018 Time-Sensitive Networking for Fronthaul

From Table 2.1 such standards as 802.1AS and 802.1Q are one of the most relevant stan- dards for deterministic communication and critical path scheduling [33]. To be more pre- cise, TSN uses even more enhanced substandards suchs as 802.1ASrev and 802.1Qbv for sheduling critical traffic in local area networks. [32]

Communication in TSN network is based on so called time-triggered flows which are also known as time sensitive streams. 802.Q standard provides scheduling and forward- ing of Ethernet frames according to their priorites to enable critical traffic management.

(28)

The standard defines so called time-based gates or time-slots that allows higher priority frames to be forwarded without queuing. The time-slot is very specific and it should be as precisely placed as possible thus time synchronization is necessary feature. In TSN the time synchronization is provided by 802.1AS-2020 standard. When a high priority frame arrives to the device, any lower priority frame traffic will be paused, or preempted, until the high priority frame is forwarded. After the high priority frame is forwarded the low pri- ority preempted frame transmission will be continued. Frame preemption is also defined by 802.Q. [32] All the mentioned protocols and standards are summared in Table 2.2.

Table 2.2. Summary time synchronization protocols and standards

Protocol Abbr. Standard(s) Target ac-

curacy

Achievable accuracy Network Time Protocol NTP RFC 5905

(version 4) < 1 s < 1 ms Precision Time Protocol PTP IEEE 1588 < 1 µs < 10 ns Generalized Precision

Time Protocol gPTP IEEE 802.1AS < 1 µs < 10 ns

Time Sensitive Networking TSN IEEE 802.1ASrev < 1 µs < 10 ns

(29)

3 METHODOLOGY

This chapter goes through the methods that are used and what could be used for eval- uating time synchronization in Ethernet networks. There is a description of the research and how the tests are implemented. Addition to the methods, this chapter will give some brief explanation of the test equipment why they are chosen and what they will provide for this research.

3.1 Requirements

The purpose of the research is to test and evaluate performance of an Ethernet device in time synchronization point of view. The objective is to find the sources that will cause errors in time synchronization and find out how much they have an impact to the accu- racy of the time synchronization. These result will help when designing a PTP, an IEEE 802.1AS or a TSN capable device on the top level. The results are defined by testing a device with appropriate testing equipment and examining the factors that affects the most to the accuracy of the time synchronization.

The device should be designed in a way that it is able to keep the time offset at least in one microsecond levels. Although the microsecond level is the goal of the PTP standard, the accuracy should preferably be a level of tens of nanoseconds. The goal is also to design the device keeping in mind the interoperability and adaption between different manufacturers.

An industrial network structure could be formed for example as described in Figure 3.1.

The device, that is designed considering the defined threshold values, should be able to perform correctly according to the network requirements regardless the size of the deployed network.

(30)

MASTER GPS

GPS

Figure 3.1.Example of an industrial network structure

The device under test (DUT) which is used in this thesis, is a TSN capable Ethernet switch that uses IEEE 802.1AS and IEEE 1588-2008 standards for time synchronization.

For measuring, the DUT provides a 1PPS physical interface that is compared to the 1PPS signal of the master node. It supports 10/100/1000 Mbit/s transmission speeds.

3.2 Test Environment

Tests were run in laboratory environment where excessive unwanted interference, also known as noise, can be minimized because the enviroment is manageable in those condi- tions. Temperature at the laboratory is around 29±1C. However, the laboratory is rather small space compared to industrial premises. Creating physically a huge network that reminds an industrial network is not feasible in laboratory environment.

The network is created using Ethernet time synchronization testing devices from the man- ufacturers such as Meinberg, Spirent and Calnex which are presented briefly below. They give the opportunity to emulate desirable size of an industrial network and generate heavy Ethernet traffic for testing purpose.

(31)

3.3 Testing Equipment

There are few options in the market from where to choose the proper equipment for evaluating time synchronization. This section explains what kind of features they offer for testing the accuracy of the time synchronization. The testing devices used in this thesis are listed in Table 3.1. There is also a brief description and key features of them below to understand why they are selected for the test setup. Table 3.1 describes also the specific usage of the device in the tests.

Table 3.1.Testing equipment for time synchronization evaluation

Equipment Test Case Usage Key Features

Spirent C50

Act as the primary testing de- vice that provides test results and emulates devices in the net- work. Generates Ethernet traffic for the network.

Supports:

• 100/50/40/25/10/1GbE SFP+/SFP ports

• NTP, PTP, GPS, and CDMA Sync

• 2,5 ns time stamp resolution Calnex

Paragon-X

Generates desirable jitter and wander to the network to dis- rupt the Ethernet traffic. Used also for modifying the timestamp field.

Supports:

• SyncE Jitter and Wander

• MTIE/TDEV Pass/Fail evalua- tion

• 5 ns accuracy

• Control of generated PTP field

PicoScope 2000

Used for ensuring effortlessly the time synchronization be- tween different devices with the help of the 1PPS signals.

Supports:

• 100 MHz bandwidth

• Analog/digital inputs

• USB interface

• 3,5 ns analog accuracy

• 5 ns ditigal accuracy Meinberg

Lantime- M1000

Act as an accurate and stable grandmaster source clock or a GPS clock in the test setup.

Supports:

• GPS, NTP, SyncE, 1PPS, 10 MHz, PTP/IEEE1588 etc.

• < ± 50 ns accuracy with dif- ferent OCXO

• 5∗10−10to2∗10−12short term stability (τ = 1s)

(32)

3.3.1 Spirent C50

Spirent C50 is a testing device that generates heavy industrial Ethernet traffic for testing purposes. The C50 model provides Layer 2 and 3 traffic generation and analysis. With the Spirent it is possible to measure and analyse time synchronization accuracy and performance of the DUT under high traffic loads.

Spirent provides also its own Spirent TestCenter application that allows user to emulate various devices in the network. The application includes test cases for testing different purposes and allows also user to create own test case for spesific purpose.

3.3.2 Calnex Paragon

Calnex Paragon is also a testing device for measuring Ethernet timings. It supports tests for PTP and NTP standards. Paragon also provides test support for 1PPS and frequency measurements. For example, frequency measurements allows calculations of MTIE and TDEV.

With the Paragon testing device it is possible to disrupt the Ethernet traffic to stress test a DUT for evaluating its performance. User is also able to define spesific jitter and wander which means that there will be variations in the signals and freaquency in the emulated network.

3.3.3 PicoScope

PicoScope is an oscilloscope that is used to view and analyze real-time signals coming from designated devices. Signals that are going to be analyzed are connected to the PicoScope device which is connected to a computer using Universal Serial Bus (USB).

PicoScope provides its own software that is used to analyze the spesific signals. The software provides charts and waveforms that helps analyzing the signals. This tool is used for comparing for example 1PPS signals between a master and a slave node where the difference can be noticed in nanosecond level.

(33)

3.4 Methods for Measuring Time Synchronization 3.4.1 1PPS Output

The most common approach to test the DUT is using the 1PPS Output method. Us- ing this method, 1PPS outputs coming from the slave and the master are connected to to a Picoscope oscilloscope using coaxial cables or Ethernet cables. In this case, the 1PPS slave signal can be taken from the DUT but the Spirent testing device does not provide 1PPS output signal. So, the reference 1PPS signals has to come directly from the grandmaster device. [14]

The difference between the signals coming from the slave and the master are compared and calculated using an oscilloscope as presented in Figure 3.2. In this test setup the PicoScope is used as an oscilloscope. The offset is the delta time between the pulse coming from the DUT and the pulse coming from the master device (∆Tmaster−slave). [14]

Figure 3.2.1PPS signal comparison

Advantages of the 1PPS is that the technique is widely used in industry standard and the method requires only an oscilloscope to measure the offset between master and slave node. But it also requires 1PPS outputs from the devices. This might be a problem for some devices for not having a 1PPS output or it is just not feasible to implement one.

Disadvantage of this method is also that the devices should be as close as possible to get the most accurate results for offset calculation. Also, this method is not feasible in larger scale testing, for example evaluating time synchronization in a large factory. [34]

(34)

3.4.2 Ingress Monitoring Method

Ingress method is a measuring technique for calculating and evaluating time synchroniza- tion accuracy. With ingress measuring method the slave node calculates the offset to the master node from the incoming synchronization message from master. Offset and path delay are calculated by knowing the raw data when the message has left from the master and when the message has arrived to the slave. The slave node saves the data or cal- culates and then sends the offset from master time information. The ingress monitoring method is presented in the Figure 3.3. [14, 34]

Figure 3.3. Ingress measuring method [14]

First, the slave saves the time (T1) which is the time that the synchronization message has arrived from the master. The departure time (T2) of the Sync message coming from the master is saved by the slave with the help of the Follow-Up message. After these messages the slave is able to calculate the offset to the master or just save T1and T2 for reporting them to the master.

Advantages of the ingress method is that the time synchronization information is send in-band. This means that the information is sent at the same time with the data inside the Ethernet packet. Also, it does not require any additional functionality from the slave.

Slave should only be able to send type, lenght, value (TLV) information to the master which means just an extented PTP message. There are also disadvantages with this method such as incorrect time error values. The sampling of the time error might be incorrect because it depends on timing of the synchronization messages. Also, the slave might report incorrect values because of a coding error or fixed phase offsets. These are the things is why the ingress method is not suitable for certification testing. [34]

(35)

3.4.3 Egress Monitoring Method

Egress monitoring method is also used for measuring the time synchronization accuracy.

It differences from ingress method so that the slave does not calculate the time error.

Slave only report the times that it has sent a PdelayReq message as shown in the Fig- ure 3.4.

Figure 3.4.Egress measuring method [14]

First the slave sends a PdelayReq message and saves the time (T1) when the message sent. Master node saves the time (T2) when the PdelayReq message has arrived. Then the slave sends the signling message which contains theT1. After this the master is able to calculate the time error between the slave.

Advantages of the egress method is that it uses in-band reporting in a same way that ingress method does. The egress method does not need calculations from the slave node because the master is now able to calculate the time error between the nodes. Also, the reporting of the time is not connected to the arriving and departuring synchronization messages. Disadvantage of the egress method is that the complexity of implementation when the network has already been deployed.

3.4.4 Reverse Sync Method

Reverse Sync is a clock accuracy measuring method which relies on functionalities of the the 802.1AS standard. The method is quite similar to the egress measuring method, to allow the master to do the time error calculations. The idea of the Reverse Sync method is that the slave synchronizes with master and enables the Reverse Sync on slave’s

(36)

side. Then the master calculates the mean path delay from the slave. After master has evaluated the path delays, the slave sends Sync message to the another way as can be seen from the Figure 3.5. Based on these information the master calculates the time error between the slave and the master. [34]

Figure 3.5.Reverse Sync measuring method [14]

The basic synchronization operation that 802.1AS uses is presented in the Figure 3.5 all the way to the line before Reverse Sync message. So first the slave calculates the mean path dealy to the master with the help of the PdelayReq, PdelayResp and PdelayResp Follow-up messages. After this operation, the slave synchronizes it self to the master’s clock with the help of the Sync and Follow-Up messages sent by the master. Then the master calculates the mean path delay to the slave the same way that slave did. After the basic 802.1AS synchronization operation, the actual Reverse Sync messages are sent by the slave but using a different clock domain. After this the master is able to calculate the time error. [34]

Advantages of using the different domain in Reverse Sync method is that the other do- main is used for the the actual synchronization and the other is used for measurements

(37)

of the recovered clock. Downside of this method is that the slave is required also to have a Sync generation implementation.

3.5 Test Setup

Test setup consists of the DUT which is the TSN capable Ethernet switch and one of the mentioned testing devices as shown in Figure 3.6. Primary testing device was Spirent C50 which is also used a lot in automotive industry. In this case the Spirent was synchro- nized with a Meinberg PTP grandmaster device using its output signals as a synchro- nization interface. The Meinberg device is an accurate and stable clock source which can be used as a grandmaster clock for a network inside a testing laboratory. The Meinberg device provides 1PPS signals, 10 MHz signal and NMEA outputs for synchronization.

These signals are used as an inputs for the Spirent and in this case the Meinberg act as a highly accurate and stable GPS source clock. [14, 34]

DUT PTP Test Device

(Spirent C50)

Oscilloscope (PicoScope) Grandmaster Source Clock

(Meinberg)

1PPS

10 MHz

NMEA 1PPS

Ethernet Ethernet

Port 7 Port 8

Port 2Port 3

SGMII 10 /100/1000BASE-T 1000BASE-T

Figure 3.6. Initial test setup

(38)

Spirent model c50, used in the tests, does not provide a 1PPS signal therefore the 1PPS signal has to be brought directly from the Meinberg. 1PPS signals from the DUT and the GPS clock source (Meinberg device) are connected to a PicoScope with coaxial wires.

With PicoScope it is easy to compare 1PPS signals and count their difference which gives easily information about the offset between master and slave node.

The DUT is connected to the Spirent using two 2,0 meters long CAT 5e Ethernet cables.

They are connected to the DUT and testing device with RJ-45 connectors which are the most common connectors used in Ethernet cables. Although, Spirent’s ports requires small form-factor pluggable (SFP) modules for connecting the RJ-45 Ethernet cables.

Because the DUT supports transmission speeds up to 1 Gbit/s, the SFP modules used to connect the DUT to Spirent are SGMII 10/100/1000.

Alternative setup is to connect Calnex device between to the Spirent and the DUT to create unpredictable Ethernet traffic. Calnex provides also opportunity to modify the fields of an Ethernet frame. The setup with the Calnex is described in Figure 3.7.

DUT PTP Test Device

(Spirent C50)

Oscilloscope (PicoScope) Grandmaster Source Clock

(Meinberg)

1PPS

10 MHz

NMEA 1PPS

Ethernet

Port 7 Port 8

Port 2Port 3

SGMII 10 /100/1000BASE-T 1000BASE-T

Jitter/Traffic Generator (Calnex Paragon-X)

Ethernet

Ethernet

Figure 3.7.Test setup with Calnex Paragon

Third setup is to connect two similar TSN capable devices together and define other as a master and another as a slave. Both devices provides similar 1PPS signals that are easy to compare with the PicoScope measuring device. Similar devices behave exactly the same way in theory that is why the difference is easy to detect while testing.

(39)

4 TEST CASES & RESULTS

Chapter 4 describes the test cases used in this thesis. Each section defines what kind of test case has been implemented and shows the key results of them. The test were chosen by investigating the references and determining the most common cases that had an impact to the time synchronization accuracy. Based on those, the evaluation has been done for each test case. The main characteristics that are going to be followed are listed below.

• Average offset

• Average deviation

• MTIE (Equation 2.6)

• TDEV (Equation 2.7)

• Mean path delays (Equation 2.13)

The goal is to find how much they will differ between the test cases. Based on this information, it is easier to evaluate the time synchronization accuracy and which things have the most effect on it. Spirent is able to calulate these characteristics automatically.

Test setups are defined in Figure 3.6 and Figure 3.7 depending on the test case. In optimal case the main testing device (Spirent) is synchronized to the grandmaster de- vice (Meinberg), but in this case they were not able to synchronize together completely because of testing device related issues.

Also, Spirent does not provide 1PPS as an output so the 1PPS signals has to come directly from the grandmaster and the DUT. Although the 1PPS signals from grandmaster and the DUT were not aligned, the offset between them remained constant. From that can be assumed that DUT is somehow synced with the grandmaster. This is just an assumption so it is not reliable source for performing the tests. This is the reason why the 1PPS method is not used for verification in this case.

As in Figure 3.6, the test setup is configured so that the port 7 from the Spirent becomes a slave and the port 8 becomes a master. The master uses Spirent’s internal oscillator and clock as an source clock.

Initially the duration of the tests were going to be few hours for noticing all of the possible deviation in the results. In this case, this duration was not feasible so it had to be shorter.

Eventually the tests were run for 10-15 minutes for getting the best and the most reliable test results in this case.

(40)

The results are divided in two different charts. First chart presents the variations of the mean path delays which are calculated based on the Equation 2.13. Second chart in the test cases shows the variation of the offset. The calculations of the offset are based on the Equation 2.14. The x-axis shows the duration of the tests in minutes. The values of the delays and offsets are presented on the y-axis in nanoseconds.

4.1 Baseline Test

This test case is the basic test that is used as a reference for the other test cases. In this test the purpose is to find out the result with the test setup that should not have any disturbance or disruption to the performance of the time synchronization. The test setup is shown in Figure 3.6.

Figure 4.1 presents the mean path delays of the test. The mean path delay is calculated for every link. The master port (Port 8) from Spirent is connected to the DUT (Port 2) which then act as a slave. Another port (Port 3) from the DUT is connected to the Spirent port (Port 7). Links are connected using 2,0 meter long Cat 5e Ethernet cables with RJ-45 connectors.

(41)

Figure 4.1.Mean path delays during the baseline test

(42)

Figure 4.1 shows that the whole path delay stays around 82ns – 90ns. So the range between minimum and maximum is about90ns−82ns= 8ns. From port 8 to the DUT the path delay stays about at35ns–42nswhile the link to the port 7 from the DUT is staying at 42ns–46ns. So the link from port 8 has bit bigger variation in the delays42ns−35ns= 7ns while the link to the port 7 has46ns−42ns = 4ns variation of the delays. In both links there are also little deviation between maximum and minimum delays that can be seen from the chart. The deviation between the ports is about from 30ns to56ns. Altogether the deviation from port 8 to port 7 is about from69ns to100ns. The ports had different delay values because port 7 had a SGMII 10/100/1000BASE-T SFP module and port 8 a 1000BASE-T SFP module.

Figure 4.2 Shows the offset between port 8 and port 7. Spirent calulates the offset and creates a chart according to the results.

(43)

Figure 4.2. Offset during the baseline test

Viittaukset

LIITTYVÄT TIEDOSTOT

When the researcher is implementing the time study the selected timing technique and distribution of work time are important instruments in order to produce relevant time study

Enhanced Phylogenetic Tree, phase correlation, structural connectivity, functional dynamics, static network, dynamical network system, time series, synchronization,

The first time when lambs should be weighed is most commonly when they are three days old, but if there is not enough time, you can use the value of 200 grams of growth a day

Hence, therefore in terms accuracy and computation time, the deep learning method best suited for using real-time information of formulating energy trade bids for Singapore’s

Tulokset olivat samat Konala–Perkkaa-tiejaksolle poikkeuksena se, että 15 minuutin ennus- teessa viimeisimpään mittaukseen perustuva ennuste oli parempi kuin histo-

Hence, therefore in terms accuracy and computation time, the deep learning method best suited for using real-time information of formulating energy trade bids for Singapore’s

The correlation coefficient between the absolute deviation and the variable, which indicates in how many measuring series the test person had used specified time study equipment

In order to have redundant and performance class T5 capable time synchronization topology, IRIG-B as main synchronization method of a few bay-level devices or as a