Synchronize your clocks

The recently approved IEEE-1588 standard is a protocol to synchronize independent clocks running on separate nodes of a distributed measurement and control system to a high degree of accuracy and precision.

This protocol is independent of networking technology and is self-configuring. Although the Network Time Protocol is established, a more accurate, more deterministic method is needed for real-time sensor control. Depending on the implementation method and local oscillator quality, submicrosecond accuracy can be achieved.

IEEE-1588 operates using nodes that measure the delays between sections of the network and uses in-band signaling messages to adjust their local oscillator. Clock nodes in the network are classified as either masters or slaves.

IEEE-1588 operates using nodes that measure the delays between sections of the network, and uses in-band signaling messages to adjust their local oscillator. Clock nodes in the network are classified as either masters or slaves. In the simplest configuration, master clocks send out “Sync” messages followed by a “Follow_Up” message. The slaves can initiate a “Delay_Request” message to which the master responds with a “Delay_Response” message. This message suite provides the slaves with sufficient information to correct their clock’s offset from the master, corrected for the delay between the master and the slave.

One of the main features of IEEE-1588 is the relatively low overhead it requires. The additional bandwidth that the IEEE-1588 protocol requires on a network is negligible, and the time interval between messages can be relatively large. The protocol is also tolerant of large changes in packet transit times. This is particularly important for machine-vision systems because the available network bandwidth varies greatly – from no load to almost fully loaded during times when image data are being transferred across the network. By synchronizing nodes on the network, better use of available bandwidth can be achieved because nodes can be programmed to transfer their data at different times and thus reduce the number of collisions.

In a typical computer-based imaging system, a control card interfaces to a camera and acts as a central timing control point, with dedicated hardware to control the camera trigger and strobe lighting, along with the reading of any sensors.

In this configuration, all the devices have some amount of indeterminism associated with them. Indeterminism causes problems such as a strobe turning on or off too early or too late during the period when an object needs to be imaged. This often requires the line to run slower to reduce the impact of this effect or the use of a faster camera with a larger field of view. In the case of a strobe, it is critical to trigger the light to coincide with the orientation of the part and not to trigger the strobe during the camera’s charge transfer period.

To reduce the amount of indeterminism in the system, custom hardware with a well-defined interface must control the devices in the system. Although effective, this hardware is typically complex and expensive. In addition, the physical interfaces are not standardized, requiring breakout cables and optical isolation.

The initial step in integrating IEEE-1588 into a machine-vision system is to add a network interface such as Ethernet. At first, a strobe light with an Ethernet interface may seem overly complex, but with the proliferation of Ethernet-enabled appliances, the cost and difficulty of implementing such a device is no longer an issue. If all the devices in the system have an Ethernet interface, a typical system can be implemented with no central controller.

Although the devices in such a system operate independently, they communicate in a synchronized deterministic fashion, and control is decentralized. Using IEEE-1588, the camera and strobe light can be programmed to occur at the same time or with some deterministic offset.

The more deterministic the components, the faster the system can operate, because the amount of time that was being allotted for variances (the indeterminism) in system timing can be eliminated. In addition to better performance, such systems are less expensive, since there is no controller or custom interface to design and build.

<b>Implementation issues</b>

For an IEEE-1588 system to be implemented in a network, the network must support multicast operation, prevent multicast messages from propagating beyond a subnet, and use boundary clocks to synchronize across subnets. Optimal performance is then achieved when delay between the master and slave is symmetrical.

Boundary clocks serve to implement a time-distribution tree. A boundary clock is required whenever there is a network element that blocks the Sync, Follow_Up, Delay_Req, or Delay_Response messages. The boundary clock is a slave to the best clock it can see and asserts that it is the master for all other paths. Thus, in a system with boundary clocks, there may be several masters. The best clock of all is designated the grandmaster.

Currently, there are different companies working on products with IEEE-1588 compatibility and companies contributing to developing and refining the standard. The US National Institute of Standards and Technology (NIST; Gaithersburg, MD, USA) also plays an important supporting role (see “NIST plays a role in network and system timing,” below).

Although there are many companies involved in developing the standard, they have a range of varying concerns. Some are interested in distributing a frequency reference throughout a system. Others see possible applications in telecom or industrial motion control. In the machine-vision industry, Valde Systems (Brookline, NH) is developing products with IEEE-1588 functionality and has patents pending for use of IEEE-1588 to control the components of machine-vision systems.

<b>Embedded designs</b>

A typical embedded implementation in an IEEE-1588 enabled device can take different forms depending on the level of accuracy desired. Just as the software can create indeterminism in frame grabbers, the same is true when implementing IEEE-1588. If a small amount of indeterminism can be tolerated in the system, an IEEE-1588 implementation can be achieved in software. If a more accurate level is desired, the implementation can be performed in hardware using an FPGA. Generally speaking, the closer the implementation is to the physical layer, the more deterministic and accurate the implementation will be.

Integrating IEEE-1588 into a network requires the addition of nodes that contain a clock used as a system reference. The accuracy of this node is determined by the system architecture. If there are network elements in the network that block IEEE-1588 messages, boundary clocks must be used in these subnets.

Another issue is availability of equipment to test implemented hardware. During an upcoming NIST conference on IEEE-1588 (Sept. 27-29, 2004, Gaithersburg, MD, USA), a “plug fest” will be held in which vendors are invited to bring their hardware to test interoperability with others. Hopefully a consortium of machine-vision companies can be assembled to represent common interests.

The writer, Matthew Linder, is President and CEO, Valde Systems, Brookline, NH, USA.

<b>NIST plays a role in network and system timing</b>

Measurement and control systems are used in test-and-measurement, industrial-automation, communication, and electrical-power systems. Traditionally, these measurement and control systems have been implemented in a centralized architecture in which the timing constraints are met by careful attention to programming combined with communication technologies with deterministic latency.

In recent years, an increasing number of such systems use more distributed architectures and increasingly use networking technologies with less-stringent timing specifications than the older more specialized technologies. In contrast to the general computing environment of intranets or the Internet, measurement and control systems typically are more spatially localized.

In the last decade, a number of academic and commercial organizations have developed techniques for synchronizing clocks in devices used in measurement and control applications. By November 2000, there was sufficient interest in starting a standardization activity on clock synchronization.

A study group met for the first time in April 2001 under the sponsorship of the IEEE Instrumentation and Measurement Society Technical Committee on Sensor Technology, which had also sponsored, along with the US National Institute of Standards and Technology (NIST), the IEEE-1451 standards activity. Consequently, the chairman of the Sensor Technology Committee, Kang Lee, formed a committee to develop a draft IEEE-1588 standard. Committee membership included engineers from the automation, robotics, test-and-measurement, and time-keeping industry, as well as representatives from NIST and the US military.

The committee produced a draft standard that was submitted for a ballot in April 2002. After a rigorous balloting process, the IEEE Standards Board approved the final draft on September 12, 2002, as a full-use standard IEEE-1588-2002—Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems. The standard was published in November 2002. On January 22, 2003, the American National Standards Institute (ANSI: Washington, DC) adopted this document as a national standard, designated as ANSI/IEEE 1588-2002.

The IEEE-1588 standard defines a protocol enabling precise synchronization of clocks in measurement and control systems implemented with technologies such as network communication, local computing, and distributed objects. The protocol is applicable to systems communicating by local-area networks supporting multicast messaging including, but not limited to, Ethernet.

The protocol enables heterogeneous systems that include clocks of various inherent precision, resolution, and stability to synchronize. The protocol also supports systemwide synchronization accuracy in the submicrosecond range. The default behavior of the protocol allows simple systems to be installed and operated without requiring the administrative attention of users.

An IEEE-1588 workshop was held on September 24, 2003 at NIST. A number of commercial implementations of IEEE-1588 were presented, and some products are now appearing in the marketplace.

A conference on the IEEE-1588 standard will be held September 27-29, 2004, at NIST headquarters in Gaithersburg, MD, USA. Full details can be obtained at

John Eidson

Agilent Laboratories

Palo Alto, CA, USA

<b>This article was reproduced from the August issue of Vision Systems Design by kind permission of PennWell Publishing (Nashua, NH).</b>