You are on page 1of 4

Redundant and Synchronized EtherCAT Network

Gunnar Prytz, Jonny Skaalvik


ABB Corporate Research
Bergerveien 12
NO-1396 Billingstad, Norway

Abstract - Communication redundancy and time synchroni- Like many of the automation protocol suites Ether-
zation are two important requirements commonly found in CAT has developed adapted solutions for redundancy
industrial systems. However, achieving high redundancy (e.g. network redundancy in the context of this paper).
performance in combination with highly accurate time syn- Also when it comes to time synchronization the various
chronization at all times is a challenging task. EtherCAT is a
automation protocol suites sometimes specify their own
high performance, functionality rich communication tech-
time synchronization solutions, either by specifying how
nology offering both advanced redundancy features and
accurate time synchronization. This paper will describe a to use the IEEE 1588 [4] protocol or by making adapted
robust solution where an EtherCAT system offers high and optimized solutions. EtherCAT therefore offers very
redundancy performance in combination with accurate accurate time synchronization of the devices reaching
time synchronization. The solutions is based on using Ether- down well below the microseconds level by the aid of
CAT slaves integrated into the EtherCAT master nodes. In hardware assisted functionality in the devices.
the redundant case there is a need for two of these inte- Since EtherCAT has become a main technology in this
grated slaves and they need to be configured appropriately domain it is of key interest to investigate how the tech-
to offer a robust solution. nology could be used in order to achieve both high levels
of redundancy in combination with accurate time syn-
Keywords - redundancy; synchronization; networking
chronization in a robust way. This is not a trivial topic
I. INTRODUCTION and this paper will outline one possible method for how
to handle this in EtherCAT.
The requirements of industrial systems may be quite
different from the ones found in typical office environ- II. TIME SYNCHRONIZATION IN ETHERCAT
ments when it comes to some specific features. Industrial
By using EtherCAT out-of-the-box the achievable
systems may have requirements related to factors like
level of time synchronization accuracy is typically speci-
safety, time synchronization, determinism and availabil-
fied to be better than 1 μs. This means that the clocks of
ity that are not common in office systems. In other situa-
all devices are synchronized to within 1 μs at all times.
tions the requirements are much harder than those in the
This is similar to most so-called real-time Ethernet tech-
office environment. Typical examples are determinism
nologies and sufficient in many cases.
and time synchronization requirements. Therefore special
However, EtherCAT also offers a significantly higher
communication solutions directly targeting industrial
performing time synchronization mechanism referred to
requirements have been developed for these challenging
as the distributed clocks (DC) functionality. The DC
situations. EtherCAT [2] is one such technology which is
functionality is an attractive feature for high performance
extensively used today and it is the focus of this paper.
control systems and instrumentation systems and depends
EtherCAT is a communication technology offering
on special hardware support in the slave devices (FPGA,
very high real-time performance accompanied by a rich
ASIC etc.) to achieve a synchronization accuracy of less
functionality set making it a leading technology from a
than 100 ns, in many cases down to a few tens of nano-
technical perspective. This combined with openness of
seconds (implementation and situation dependent). The
the technology and the wide availability of software and
DC functionality can be enabled in most EtherCAT hard-
hardware components has made EtherCAT a market lead-
ware implementations and will make it possible for all
ing technology as well [1], extensively used in many dif-
EtherCAT slaves with DC support to be very accurately
ferent industrial systems requiring high-end deterministic
synchronized (any devices without DC support will still
communication performance. The technology is also
be synchronized to within 1 μs or so).
increasingly used in laboratory and instrumentation envi-
It is normally the slave closest to the master which is
ronments. A detailed presentation of the EtherCAT tech-
the clock master or reference clock in an EtherCAT net-
nology is however outside the scope of this paper.
work. In the case with a mix of devices with DC support

978-1-4244-5841-7/10/$26.00 ©2010 IEEE 201 SIES 2010


and devices without it the device with DC support sitting Later in the paper it will be shown that some special
nearest to the master will normally be the clock master. measures needs to be taken to guarantee uninterrupted
In EtherCAT the highest time synchronization accu- time synchronization accuracy when a (media) redundant
racy can only be guaranteed between the slaves. This is EtherCAT system experience a failure (e.g. when a cable
the same for both the ordinary time synchronization as is accidentally cut or damaged).
well as the DC feature. Since the EtherCAT master nor-
mally runs in a standard CPU the jitter in the transmission
and reception times of telegrams (i.e. the variability of
the cycle times) may be of the order of microseconds
(assuming a real-time operating system is used). The Eth-
erCAT slaves on the other hand have the complete net-
work interfacing and telegram processing in hardware
and thus the timing is virtually constant. Therefore, the
synchronization accuracy between the master and the
slaves may be in the order of microseconds whereas the
synchronization accuracy between the slaves is either
better than a microsecond (without DC) or down to some
tens of nanoseconds (with DC).

III. INTEGRATING THE ETHERCAT MASTER


WITH AN ETHERCAT SLAVE

In many situations it is only required to synchronize


the slave devices, e.g. in some motor control applications.
When both the EtherCAT slaves and the master needs
high time synchronization accuracy some additions have
to be made. Rehnman and Gentzell [9] described a solu-
tion where the EtherCAT master and one EtherCAT slave
was integrated into one physical node or device. The ben-
efit of this is that the accurate clock of the slave device is
available to the EtherCAT master via some direct inter-
face (e.g. a digital line). This enhanced master device will
then be accurately synchronized with the other slave
devices. In this setup all EtherCAT nodes on the network
could be synchronized to the same accuracy. Further-
more, by enabling the DC functionality of the inbuilt
slave the enhanced master device could be very accu- Figure 1. A combined EtherCAT master and slave device
rately synchronized to the other devices with DC support where an external clock source is used to set the internal
clock of the EtherCAT slave via the process data interface
since it has direct access to this slave via a dedicated (PDI). The EtherCAT slave then synchronizes the EtherCAT
hardware interface. master via the SYNC (S) line.
The coupling between the EtherCAT master and the
integrated slave needs to be tight in order for this to work. V. MEDIA REDUNDANCY IN ETHERCAT
The work of [9] described how the EtherCAT master can
be synchronized with the collection of slaves by the use Redundancy is a common way of increasing the avail-
of an integrated slave in the master. In this setup the Eth- ability of a system. Redundancy means that some parts of
erCAT master therefore is a clock slave. the system has been duplicated. There are various levels
of redundancy in a system, ranging from media redun-
IV. ACCURATE SYNCHRONIZATION WITH AN dancy where certain communication paths have been
EXTERNAL CLOCK duplicated via devices with multiple network interfaces
to systems where the devices are themselves duplicated.
In other situations it is a requirement that all Ether-
In extreme cases duplication may not be enough so paths
CAT nodes (master and slaves) are clock slaves of some
or interfaces or devices can be present in triplets or more.
other master clock outside the EtherCAT system.
Such systems will not be discussed in this paper.
A setup for doing this is depicted in Fig. 1. The solu-
Redundancy performance or redundancy requirements
tion shown in Fig. 1 connects the external reference clock
are often described in terms of recovery time. The recov-
to the EtherCAT slave via the PDI (Process Data Inter-
ery time of a system is the sum of two terms: 1) the time
face) of the EtherCAT slave. The master is synchronized
it takes to detect a failure and 2) the time it takes to rees-
with this slave via a dedicated digital line.
tablish communication. The most common network

978-1-4244-5841-7/10/$26.00 ©2010 IEEE 202 SIES 2010


redundancy solution is the well-known RSTP technology (EtherCAT devices only process traffic in one direction).
which is commonly used in office type of networks. This has significant consequences.
RSTP typically offers recovery times of seconds or Since the EtherCAT telegrams are processed in one
slightly below this for reasonably complex topologies direction only the result is that in one of the lines the pro-
(the recipe for achieving faster recovery times with RSTP cessing will be in the direction away from the master
have been specified in IEC 62439 [3]). whereas in the other line the processing will be in the
When it comes to network or media redundancy Eth- opposite direction.
erCAT offers a ring redundancy approach which can han- Since the telegram processing only takes places in one
dle many common failure modes. Using a physical ring direction one of the internal slaves need to be connected
topology an EtherCAT system can handle the failure of a in reverse, i.e. to have the opposite processing direction,
link or a device while still being able to maintain the in order to ensure that the first processed slave is the inte-
functionality for the remaining system. The recovery grated one in both of the two line networks. This situation
time will be in the milliseconds range. Such a solution is shown in Fig. 2. For completeness it should be said that
cannot handle the failure of the master, in this situation it would not be necessary to configure the integrated
EtherCAT master redundancy using two masters in paral- slave in reverse if the DC functionality was not used.
lel needs to be used but this is outside the scope of this In the ring topology state (Fig. 2) the EtherCAT mas-
paper. ter will transmit the telegram(s) on both ports. In one
In a redundant EtherCAT setup the master is con- direction (A to H) all slaves except slave H will process
nected to an EtherCAT ring via two network interfaces. the telegram(s). In the other direction (H to A) only slave
In every cycle the EtherCAT master sends its telegram(s) H will do processing. This is transparent to the applica-
on both of these ports. These telegrams will be forwarded tion but needs to be handled properly by the master.
throughout the ring and eventually return at the master. In the dual-line state (Fig. 2) with a failure somewhere
The master will thus receive the telegram(s) it sent on in the ring the system now consists of an EtherCAT mas-
both ports. ter with two lines connected. The telegram sent out on
When a failure happens the EtherCAT devices next to one of the lines (A-D) will first the processed by slave A
the failure (be it a link failure or a broken device) will and then subsequently by slaves B, C and D before
enable the loopback functionality and all telegrams will returning to the master. The telegram sent out on the
be reflected back in the direction they came from. This in other line (H-E) will be processed by slave H before slave
practice means that the EtherCAT ring network has E, F and G and then return to the master. Since the second
turned into two EtherCAT line networks. internal slave (H) has been connected in reverse this is
This transition from a ring topology to a dual-line the first slave that processes the telegrams from the mas-
topology has a significant influence on the time synchro- ter. Since it is the first slave it can act as the DC master
nization accuracy. Previously the benefits of having an for all the EtherCAT devices of this line. The result is
EtherCAT slave device integrated into the EtherCAT then that both EtherCAT lines are accurately synchro-
master physical node were discussed. However, this is nized to the first slave of the respective line. Since both
not enough in the redundant setup with an EtherCAT of these first slaves are integrated into the EtherCAT mas-
ring. When the ring turns into a dual-line topology after a ter node they can both be accurately synchronized with
failure the result is that one of the two lines lack both an the EtherCAT master. The result is a redundant EtherCAT
EtherCAT reference clock and an integrated slave. The system where both the master and all the devices are
absence of an EtherCAT reference clock means that no accurately synchronized in both the ring state and in the
DC functionality is available for these slaves. Thus there dual-line state.
is a significant asymmetry between the two lines where As a final remark it should be noted that the EtherCAT
only one of the two EtherCAT line networks have accu- telegrams ideally should be reconfigured upon a transi-
rately synchronized devices. tion from the ring topology to the dual line topology. This
would be more efficient since the line with slaves A to D
VI. ENHANCED ETHERCAT MASTER (Fig. 2) would not have any use for data destined for
slaves E to H and vice versa. However, such a reconfigu-
In order to guarantee the time synchronization accu-
ration may be too demanding to do for a system in run-
racy of a redundant EtherCAT network using a ring topol-
time.
ogy there is therefore a need to integrate two slaves into
the physical EtherCAT master device. Upon a failure the VII. ADDITIONAL REMARKS
ring will transition into a dual-line topology which both
need an integrated slave to be able to synchronize the After the transition from the ring topology to the dual
master and all devices together accurately. This is true line topology the concept outlined here will enable accu-
regardless of whether the DC functionality is used or not. rate synchronization of all devices present. However, the
Furthermore, it is important to realize that the process- master and the slaves E to H in Fig. 2 would need some
ing directions are structurally opposite in the two lines transition time before the desired time synchronization

978-1-4244-5841-7/10/$26.00 ©2010 IEEE 203 SIES 2010


Figure 2. Enhanced EtherCAT master node with two integrated slaves. The integrated slaves are coupled with opposite processing
directions. The position of the failure (a link failure in this example) is indicated by the cross in the ring to the left. The processing
direction of the EtherCAT slaves are indicated by the arrows and the solid box inside the slaves.

accuracy can be obtained after a failure and transition relevant for high-end industrial communication systems.
from the ring to the dual line state. This is due to the fact Accurate synchronization of all devices is guaranteed
that the EtherCAT master needs to measure internal immediately after failure recovery, i.e. after transition
delays in the system, i.e. delays between the devices. from a ring topology to the dual line topology.
These delays are used to calculate the clock offset
between the devices (and the master). Special care has to REFERENCES
be taken to avoid this initial transition but this is outside
[1] Ethernet-Based Device Networks Worldwide Outlook.
the scope of this paper. There may also be other failure Market analysis and forecast through 2012. ARC Advisory
modes that needs special handling, e.g. for systems sup- Group 2008.
porting hot swapping or hot connect. [2] IEC 61158. Industrial Communication Networks - Field-
bus Specifications. IEC 2007.
VIII. CONCLUSION [3] IEC 62439 ed. 2. High Availability Automation Networks.
IEC 2010.
This paper has outlined a robust approach for the com- [4] IEEE 1588-2008 IEEE Standard for a Precision Clock
bination of accurate time synchronization of all nodes in Synchronization Protocol for Networked Measurement
an EtherCAT system combined with high performance and Control Systems.
network or media redundancy. The approach uses only [5] IEEE 802.1D-2004. MAC Bridges. IEEE 2004.
standard EtherCAT functionality. The solution depends [6] http://www.ethercat.org.
on tight integration of the EtherCAT master with two [7] Prytz, G: A performance analysis of EtherCAT and
internal EtherCAT slaves, resulting in an enhanced Ether- PROFINET IRT. ETFA 2008. Proceedings, pp. 408-415,
CAT master with some additional functionality. In addi- 2008.
tion the approach requires reversing the processing [8] Prytz, G: Redundancy in industrial Ethernet networks.
WFCS 2006. Proceedings, pp. 380-385, 2006.
direction of one of the integrated slaves.
[9] Rehnman, M. and Gentzell, T: Synchronization in a force
Using this synchronized and redundant solution the
measurement system using EtherCAT. ETFA 2008. Pro-
EtherCAT system will have a very interesting feature set ceedings, pp. 1023-1030, 2008.

978-1-4244-5841-7/10/$26.00 ©2010 IEEE 204 SIES 2010

You might also like